CentOS 7 初始化mysql
To initialize MySQL on CentOS 7, you can follow these steps:
-
Install MySQL by running the following command:
sudo yum install mysql-server -
Start the MySQL service by running the following command:
sudo systemctl start mysqld -
Run the MySQL secure installation script to set a root password and secure the installation:
sudo mysql_secure_installationThis script will guide you through setting a root password, removing anonymous users, disallowing remote root login, and removing test databases.
-
Enable the MySQL service to start on boot by running the following command:
sudo systemctl enable mysqld -
Verify that the MySQL service is running by running the following command:
sudo systemctl status mysqldIf the service is running, you should see an output indicating that it is active (running).
That's it! You have successfully initialized MySQL on CentOS 7
原文地址: http://www.cveoy.top/t/topic/iXTS 著作权归作者所有。请勿转载和采集!