Home > Database > Mysql Tutorial > How to install MySQL via SSH on CentOS VPS

How to install MySQL via SSH on CentOS VPS

王林
Release: 2023-05-28 13:24:55
forward
1227 people have browsed it

Inputyum install mysql-server

在CentOS VPS上怎么通过SSH安装MySQL

Press y to continue

在CentOS VPS上怎么通过SSH安装MySQL

Installation completed , set to start mysql at boot, enter chkconfig --levels 235 mysqld on

在CentOS VPS上怎么通过SSH安装MySQL

and then start tomcat, enter service mysqld start

After startup, log in to mysql and set the password

在CentOS VPS上怎么通过SSH安装MySQL

Enter set password for 'root'@'localhost' = password('12345678') ;To set the password

在CentOS VPS上怎么通过SSH安装MySQL

At this point, mysql is installed! Then create the database, first use show databases; to view the database

在CentOS VPS上怎么通过SSH安装MySQL

and then use

create database database name; to create the database,

Use

grant all privileges on database name.* to root@localhost identified by 'password'; Assign a user to the newly created database

The super user is assigned here root, the red area in the figure below is the database name.

在CentOS VPS上怎么通过SSH安装MySQL

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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template