The following articles mainly describe the actual operations of MySQL database management and configuration database mysqladmin and how to operate the database correctly. The specific descriptions of these content are as follows, hope that you will go from the middle to what you want.
Download rpm from the MySql database website and install two packages: server and client, which contains programs such as mysqladmin ).
After installation, start the database first:
- $ /etc/init.d/mysqld start
In this case, the database can be accessed anonymously and there is only one database named test. For further settings, run mysql_secure_installation, which will help you set such items as passwords. After running this program, your mysql database instance can be officially launched.
Manage and configure the database mysqladmin ):
1. view the database instance status:
- $ mysqladmin -u root --password=<your password> status
2. Check whether the database instance is running:
- $ mysqladmin -u root --password=<...> ping
Database Operations (mysql ):
1. Connect to the local database instance:
- $ mysql -u root --password=<your password>
The following commands assume that the mysql database is currently in use.
2. view the databases in the current database:
- mysql> show databases;
The above content is a "little bit" Introduction to the MySQL database. I hope you will have some gains.