Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

Thursday, August 27, 2009

Directadmin - MySql move a database and grant user permission

So to move a Mysql database from one server to another all you have to do is copy the database over and then grant the appropriate permissions to the new database on the new server.

In the example below the username is da_admin and password kbjlms1X

the database name is aurorafcs_md
the database user name is also aurorafcs_md
the database user password is gggyro33

To grant the permissions:
2. [root@ns2 conf]# mysql -uda_admin -pkbjlms1X
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6118
Server version: 5.0.37-standard MySQL Community Edition - Standard (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all privileges on aurorafcs_md.* to aurorafcs_md@localhost identified by 'gggyro33';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye

Tuesday, August 18, 2009

Mysql directories and move info

It is no fun when a linux shared hosting server crashes. You have to move the web files, email, and any mysql databases the users websites are running on, not to mention DNS info. So get some mountain dew and lets get started:

Mysql important directories:
The databases are all here: /var/lib/mysql

Grep for the mysql username and password in:
Joomla - configuration.php
Drupal - settings

Directadmin info is here: /usr/local/directadmin