Getting paid internationally?
Choose Payoneer.


Uploading Old Data to a New MySQL Database


The following command-line procedure makes a database in MySQL (or MariaDB) and populates it with content from a backup file.

==========

user@host: $ mysql -u root -p -h localhost

mysql> CREATE DATABASE dbname;

mysql> USE dbname;

mysql> SELECT database();
/* Checks if the intended database is the one being used. */

mysql> SOURCE dirname/filename;
/* Location of the backup file */

mysql> SHOW tables;
/* Verifies if the tables uploaded are from the backup file. */

mysql> GRANT ALL ON dbname.* TO 'username'@'localhost' IDENTIFIED BY 'password';

mysql> QUIT;

==========

Comments


Getting paid internationally?
Choose Payoneer.


Get started with DigitalOcean SSD Virtual Servers  Email Newsletters & Email Marketing by YMLP.com

Popular posts from this blog

Enabling HTTPS in Home Assistant

Running Home Assistant on FreeBSD Servers

Configuring the FreeBSD Firewall with IPFW