Migrating a shared server client database to a Direct Admin server (shell commands)
By Ruben on May 31, 2011 | In Linux Hosting, Direct Admin | Send feedback »
Steps:
- @DA control panel: create a new DB
- @DA SSH console as root: retrieve DB as SQL from source MySQL host
- @DA SSH console as root: restore the database
After finishing step 1, login at the Direct Admin server as root user and execute the following commands. (Adapt hostname, dbname and credentials to fit your situation)
mysqldump -h remote.mysqlhost.com --user=yyyyyy --password=zzzzzz --no-create-db --add-drop-table --databases dbname | grep -v "USE.*\`dbname\`" > dump.sql
mysql -u da_admin --password=`awk -F'=' '$1=="passwd" {print $2}' /usr/local/directadmin/conf/mysql.conf` -D newdbname < dump.sql
No feedback yet
Comments are closed for this post.
« Install a CentOS 6.x Appliance Template in Proxmox | Migrate openvz container to proxmox VE best practice » |