AnclaNET
MySQL Databases



How can I access mysql database remotely?
How can I backup a database using phpmyadmin?
How do I add a mysql database in Cpanel?
How do I delete a MYSQL database?
How do I restore a database using PHPMyadmin?
What is Mysql?
What is the default mysql port?
What is the mysql host name?




How can I access mysql database remotely?
Under the mysql header in Cpanel, select 'manage mysql'
Then scroll down to the 'access hosts' input field. Place your IP address (your local computer not the server)in there and click 'add host'.
This should allow you to remotely connect using your database username/password.



How can I backup a database using phpmyadmin?
Backing up your database in Phpmyadmin is accomplished by doing the following:
1) Once you have reached the PHPMyadmin screen, select the database you want to back up.
2) Select the 'export' tab on the top right of the screen.
3) Scroll down the page and click 'Save as file' and click on the 'go' button.
This will save a copy of your database on your local computer.



How do I add a mysql database in Cpanel?
To create a MySQL database:

- Go to 'Manage Mysql' under the database header in Cpanel
- In the DB text field, type the name you wish to give your database
- Click the Add DB button
- At the bottom of MySQL Manager under 'Users' type a database user name and password
- Click the Add User button

Now for the important part that everyone misses:

You should now see your new user listed in the dropdown menu after 'User:' and your new database listed in the 'DB:' dropdown menu. (if you don't try refreshing the page in your browser) Then, select BOTH the username AND the DATABASE NAME and click the Add User to DB button to add your user to your database and you're done.

Now that you have created a database, created a database user and have granted that user access to the database your mysql database is fully ready to use.



How do I delete a MYSQL database?
Removing a database will delete that database ENTIRELY from the server. Please make sure you have saved a copy of the database if you want to keep any of the data in contained in it.

To remove a database:
Click on the 'Manage Mysql' under the 'database' header in Cpanel.
Click on the DELETE button next to the specific database.



How do I restore a database using PHPMyadmin?
You can restore a database backup in PHPMyadmin by doing the following:

1) After entering PHPMyadmin from Cpanel, select the database name that you wish to restore from the dropdown list at the top left of the screen.
2) Select the 'import' tab on the top right of the screen.
3) Push the 'browse' button and locate the file you wish to restore on your local computer hard drive.
4) Click the 'go' button at the bottom right of the screen.



What is Mysql?
MySQL is a Relational Database Management System. A relational database adds speed and flexibility, by storing data in separate tables rather than putting all the data in one area. These tables are linked by defined relations making it possible to combine data from several tables upon request.

Using a RDMS means it is possible to add, access, and process the data stored in your database.

'SQL' stands for 'Structured Query Language' - the most common standardised language used to access databases.



What is the default mysql port?
3306 is the default mysql port.



What is the mysql host name?
Always use 'localhost' whenever asked