相比Windows系统,Linux系统上安装MySQL比较简单,本文将详细介绍如何在Ubuntu系统安装MySQL。
PART 1 安装MySQL
1.更新软件源sudo apt update2.安装MySQL
sudo apt-get install mysql-server sudo apt-get isntall mysql-client sudo apt-get install libmysqlclient-dev3.确认安装成功
# 输入以下命令能进入mysql则安装成功 mysql -u root -p
PART 2 MySQL常用命令
# 查看数据库 show databases;
# 添加用户 grant all privileges on testDB.* to test@localhost identified by ‘1234‘; grant select,update on testDB.* to test@localhost identified by ‘1234‘; grant select,delete,update,create,drop on *.* to test@"%" identified by "1234"; grant all privileges on testDB.* to test@localhost identified by ‘1234‘; flush privileges; //刷新系统权限表
【教程】Linux上安装MySQL
标签:create linu linux bash sel server 教程 数据库 lin
查看更多关于【教程】Linux上安装MySQL的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did117097