Inputyum install mysql-server
Press y to continue
Installation completed , set to start mysql at boot, enter chkconfig --levels 235 mysqld on
and then start tomcat, enter service mysqld start
After startup, log in to mysql and set the password
Enter set password for 'root'@'localhost' = password('12345678') ;To set the password
create database database name; to create the database,
grant all privileges on database name.* to root@localhost identified by 'password'; Assign a user to the newly created database
The above is the detailed content of How to install MySQL via SSH on CentOS VPS. For more information, please follow other related articles on the PHP Chinese website!