linux中mysql的安装
来源:互联网 发布:知远战略与防务网站 编辑:程序博客网 时间:2024/06/06 05:23
yum云下安装mysql(最好挂在本地yum云)
yum install mysql-server -y
启动mysql
service mysqld start
设置mysql开机自启
chkconfig mysqld on
查看mysql开机自启状态
chkconfig mysqld --list通过mysql命令连接数据库
mysql
执行以下命令:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123' WITH GRANT OPTION;
显示数据库
show databases;
打开数据库mysql
use mysql;
显示表
show tables;
查询user表中的数据
select host,user,password from user;
输出其他用户名的信息
delete from user where host != '%';
刷新
flush privileges;
退出重新登录 需要输入用户名 密码123
mysql -u root -p
输入密码:123
mysql编码问题:
在安装mysql的linux节点路径/etc/my.cnf中加入:
[client]
default-character-set=utf8
在[mysqld]下添加
default-character-set=utf8
重启mysql:
service mysqld restart
进入mysql查看编码方式:show variables like 'character_set_%';
阅读全文
0 0
- linux中mysql的安装
- linux中mysql的安装
- Linux中MySQL的安装
- linux 中安装mysql
- linux 中安装mysql
- Linux中安装mysql
- linux中安装mysql
- Linux中安装MySQL
- linux中mysql安装
- Linux中安装mysql
- 在linux中二进制mysql的安装
- linux中mysql的安装与应用
- linux中mysql的安装与配置
- 28-linux中mysql的安装
- Linux中mysql的安装(yum)
- Linux中mysql数据库的安装
- (mysql for Linux) CentOs中mysql的安装与配置
- linux ubunu中安装mysql
- 0x000.索引
- 洛谷 P1414 又是毕业季II
- iOS 清理本地缓存
- OpenStack环境搭建(1)--控制节点
- Java sql查询
- linux中mysql的安装
- Android生命周期浅析(一)
- 延迟加载(Lazyload)三种实现方式
- VUE组件之间的通信
- opencv对遥感图像基本操作
- mysql-5.7.20-winx64.zip 安装
- Struts2(八)---通用标签&表单标签
- java.net.SocketException: Unexpected end of file from server 异常解决
- 安装使用chardet插件