MySQL

How to migrate entire MySQL database from 32 bit Linux server to 64 bit Linux server

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

If you want to copy database from one server to another server with the same OS and same MySQL version, you can simply copy the binary files.

1, Shutdown Apache and MySQL

apachectl stop
mysqladmin -uroot -p shutdown

2, Go to your database file directory and make a tar ball:

tar cvf db.tar *

3, Copy tar file to proper directory on another server and restart MySQL

scp root@anotherserver:/disk2/mysqldb/db.tar .

Start MySQL and Apache

mysqld_safe &
apachectl start

But if you want to migrate database from 32 bit Linux server to 64 bit Linux server, you need to do the following.

1, Export database using mysqldump on 32 bit server

mysqldump -uroot -p --all-databases > db.dump

2, Copy dump file to 64 bit server

scp root@32bitserver:/disk2/mysqldb/db.dump .

3, Import database on 64 bit server

mysql < db.dump

Technorati :

Popularity: 1%

Comments

How to Integrate Sphinx with MySQL

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

1, Sphinx can be MySQL’s storage engine

CREATE TABLE t1
(id INTEGER NOT NULL,
weight INTEGER NOT NULL,
query VARCHAR(3072) NOT NULL,
group_id INTEGER,
INDEX(query)
) ENGINE=SPHINX CONNECTION=”sphinx://localhost:3312/enwiki”;

SELECT * FROM enwiki.searchindex docs
JOIN test.t1 ON (docs.si_page=t1.id) InsertText
WHERE query=”one document;mode=any” limit 1;

2, How to configure Sphinx with MySQL

Sphinx engine/plugin is not full engine:
still need to run “searcher” daemon

Need to compile MySQL source with Sphinx to integrate it
MySQL 5.0: need to patch source code
MySQL 5.1: no need to patch, copy Sphinx plugin to plugin dir

Technorati :

Popularity: 1%

Comments

How to reset MySQL table sequence

No GoodNeed ImprovementOKGoodExcellent (1 votes, average: 5 out of 5)
Loading ... Loading ...

ALTER TABLE tbl AUTO_INCREMENT = 100;

Popularity: 1%

Comments

Next »