Showing entries 751 to 760 of 985
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: database (reset)
I Will be Speaking at the Cloud Computing Expo

As the title says, I will be speaking at the Cloud Computing Expo.And while I have spoken before to a bunch of people before, this is by far, a lot bigger.
The topics I was thinking of talking about was a piece from my previous presentation which would be about speeding up MySQL for a web site developers.I have edited those parts of the presentation and uploaded then to youtube.They can be found here and here.
What I'd like to talk about is a mixture of the posts I had about Storing Conditions

[Read more]
MySQL University: Testing multiple servers with MySQL Sandbox

This Thursday (April 30th, 14:00 UTC), Giuseppe Maxia will give a MySQL University session on Testing Multiple Servers With MySQL Sandbox. Giuseppe is the creator of MySQL Sandbox, and has recently announced a new Sandbox version and other interesting changes, for example the --query-analyzer option to make_sandbox (but note the date when this was announced!).

For MySQL University sessions, point your browser to this page. You need a …

[Read more]
New Database Connect Look in NetBeans 6.7

Hi all,

If you expand a database connection node in the Services window of the IDE, you'll notice a new look. What are all of these nodes under the connection nodes? They're schemas. For the most part, if you're using Java DB, the only schema you'll need to worry about is the app schema. I'd be interested in knowing what developers have used the other schemas for.

When you expand the MySQL conect node, what you get is a list of databases you've created in MySQL. These database are actually schemas you've created in your MySQL database.

There you have it.

Cheers!

--James

Example of a Basic MSSQL Query using PHP

An example of a basic MSSQL (Microsoft SQL Server/SQL Server Express) query using PHP.

1
2
3
4
5
6
7
8
9
$szQry = "SELECT column1, column2 FROM foo";
$szDBConn = mssql_connect("host","username","password");
mssql_select_db("database_name", $szDBConn);
$saResults = mssql_query($szQry, $szDBConn);
while($obResults = mssql_fetch_row($saResults))
{
   echo $obResults[0]." ".$obResults[1];
}
mssql_close($szDBConn);

Comments/description of Example

Line #1
SQL statement that will be sent to the MySQL database server.
Line #2
MSSQL database login credentilas; host (127.0.0.1), username and password.
The “host” is the server name or IP address of your database server. If your host has multiple instances the “host” value would be formatted like so …
[Read more]
Spockproxy: Load data into each specific shard

Note – this post is a footnote for my MySQL users conference presentation Sharding Using Spockproxy: A Sharding-only Version of MySQL Proxy.

When you finished my last blog post you have a directory for each shard full of load files. The tables had been created so now we’re ready to load these files.

These two queries will generate load scripts, modify them as needed or write your own.

SELECT concat(‘ LOAD DATA INFILE \’
/db0′, ‘/’, st.table_name, ‘\’ INTO TABLE ‘, st.table_name, ‘;’) AS ”
FROM shard_table_directory st
WHERE status = ‘universal’;

and run this once for each shard (change the sr.database_id = 1 to each database_id).

SELECT concat(‘ LOAD DATA INFILE \’
/db’, database_id, ‘/’, st.table_name, sr.range_id, ‘\’ INTO TABLE ‘, …

[Read more]
Spockproxy: Dump the sharded data

Note – this post is a footnote for my MySQL users conference presentation Sharding Using Spockproxy: A Sharding-only Version of MySQL Proxy.

During the development and testing of our Spockproxy I found I was dumping and loading the data from our old non-sharded databases into shards repeatedly while we tried to get the configuration correct. I developed this process and I’ve found that id works easily; hopefully you’ll find it helpful.

1. set up a directory that your database server can dump to – in it create one directory for each shard and name them ‘db1’, ‘db2’, ‘db3’ and so on and a directory for the universal db as ‘db0’.

2. modify this SQL, change the
to the path to the directory you created in step 1 (the parent directory) and change the 30 where it says “AND range_id < 30” to be the …

[Read more]
Spockproxy: Dump and load the schemas

Dump and load the schemas (one for universal and one for the shards).

Note – this post is a footnote for my MySQL users conference presentation Sharding Using Spockproxy: A Sharding-only Version of MySQL Proxy.  

Dumping the schema is fairly straight forward using mysqldump.  There are two issues: we need to separate the “universal” tables from the sharded tables and you need to decide what to do about auto_increment.

Separating the tables is simple if you have your shard_table_directory table set up the way you like it then run:

SELECT group_concat(table_name, SEPARATOR ‘ ‘) FROM shard_table_directory WHERE status = ‘federated’;

and

SELECT group_concat(table_name, SEPARATOR ‘ ‘) FROM shard_table_directory WHERE status = ‘universal’;

and keep …

[Read more]
Oracle buys Sun, but does it buy open source?

The big news to kick off this week was Oracle’s announced acquisition of Sun Microsystems. There is already a lot of discussion of the integration challenges, how Oracle is getting into hardware (or as Matt Asay describes it, having an ‘iPod moment’) and of course, the implications for open source software. What stands out to me is the fact that the world’s biggest proprietary database player — one of few software giants that still sells and supports primarily proprietary software — will own the world’s most popular open source database, MySQL. It is unclear how significantly MySQL figures into the deal, but given Sun spent $1b acquiring it and further invested in its enterprise readiness and use, …

[Read more]
Oracle to Buy Sun !!!

Sun and Oracle today announced a definitive agreement for Oracle to acquire Sun for $9.50 per share in cash. The Sun Board of Directors has unanimously approved the transaction. It is anticipated to close this summer.What will happened in MySQL, JAVA.I think its enough.http://www.sun.com/aboutsun/pr/2009-04/sunflash.20090420.1.xml

Slave Replication Errors

Image by MethoxyRoxy via Flickr

I had a problem with slave replication, every now and then we would get an error which manually had to be resolved

We used Set Global sql_slave_skip_counter = 1; start slave;

You might also get some of those when you set up a new slave using a mysqldump. If from the time you started the mysqldump and by the time it finished, some lines were added to the bin logs or you started it at the wrong position, then you would get some duplication errors.

While it looks concerning, don’t panic. You can fix it by skipping the lines that are duplicates, although it’s not an ideal situation.


Now if you want to completely avoid errors, or specifically duplicates and you are sure that the odd ones that …

[Read more]
Showing entries 751 to 760 of 985
« 10 Newer Entries | 10 Older Entries »