Security should be the first thought that comes to a MySQL administrator’s mind after creating a new database. Privilege as was discussed in the section, “The Privilege Tables”, securing a database is accomplished through modifications made to the tables found in the mysql database. In this section,
Using mysqladmin
The mysqladmin program is used to administrate various aspects of the MySQL database server. Using it, the administrator can perform tasks such as: create and delete databases, shutdown the database server, update the privilege tables, and view running MySQL processes. The general syntax is:
Read More
Selecting a MySQL Database
Of course, simply connecting to the MySQL server isn’t going to accomplish much. Chances are you will want to select a database to work with. This is accomplished in one of two ways:
Connecting to the MySQL Server For the First Time
The MySQL client program, also known as the MySQL monitor, is an interface that allows the user to connect to the MySQL server, create and modify databases, and execute queries and view their results. This program is started by executing the command mysql at the shell prompt. In general, the syntax for this command is:
Understanding MySQL Configuration File
It’s very likely that the first task the administrator will want to undertake is proper configuration of MySQL’s configuration file. This file, entitled my.cnf, stores default startup options for both the server and for clients. Correct configuration of this file can go a long way towards optimizing MySQL, as various memory buffer settings and other valuable options can be set here.
Creating a MySQL Database in Plesk
Log into Plesk control panel on your dedicated or cloud server:
1. Click Websites & Domains
2. Click on Databases
Creating a MySQL Database in cPanel
Log into cPanel control panel on your dedicated server:
1. Click the MySQL Databases icon
2. In the box to the right of New Database, please provide a name for the database.
Creating a MySQL Database in Plesk
Log into Plesk control panel on your dedicated server:
1. Click Websites & Domains
2. Click on Databases
Creating a MySQL Dump File
Run the following command to dump a database:
# mysqldump database_name > Database_name.sql
For example, you want to dump a database called “mydb”.
# mysqldump mydb > mydb.sql
How to Reset a MySQL root Password
1. # /etc/init.d/mysqld stop
2. Start MySQL server without password:
# mysqld_safe –skip-grant-tables &