安装mysql server:
1、 sudo apt-get install mysql-server
2、 如果出现Unable to locate package……,执行sudo apt-get update,然后再执行sudo apt-get upgrade,再执行sudo apt-get install mysql-server
3、 进入mysql命令窗口,需要输入mysql -h localhost –u root –p
4、 接着输入安装时的密码
5、 创建用户CREATE USER ‘guo.liang‘@‘localhost‘ IDENTIFIED BY ‘851220‘;
6、 授权GRANT ALL ON cookbook.* TO ‘guo.liang‘@‘localhost‘;
安装mysql workbench客户端:
1、 sudo apt-get install mysql-client
2、 sudo apt-get install mysql-workbench
运行mysql workbench:
1、 whereis mysql-workbench 查找在那个目录
2、 /usr/bin/mysql-workbenth 运行mysql workbench
时间: 2024-12-30 09:41:52