Install mysql on centos 7
来源:互联网 发布:张敬轩关智斌 知乎 编辑:程序博客网 时间:2024/04/29 12:06
install
参照这篇教程:
https://www.linode.com/docs/databases/mysql/how-to-install-mysql-on-centos-7
注意
after:
sudo yum install mysql-serversudo systemctl start mysqldmysql -u root -p
以前默认mysql的root密码为空,但是现在的版本有个随机密码(具体原因我也不知道,有知道的请给我留言),这个密码通过下面语句查看:
shell> sudo grep 'temporary password' /var/log/mysqld.log
说明:
At the initial start up of the server, the following happens, given that the data directory of the server is empty:
The server is initialized.
An SSL certificate and key files are generated in the data directory.
The validate_password plugin is installed and enabled.
A superuser account ‘root’@’localhost is created. A password for the superuser is set and stored in the error log file. To reveal it, use the following command:
shell> sudo grep ‘temporary password’ /var/log/mysqld.log
Change the root password as soon as possible by logging in with the generated, temporary password and set a custom password for the superuser account:
shell> mysql -uroot -p
mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘MyNewPass4!’;
详情见官方文档:http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html
create new user
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';FLUSH PRIVILEGES;
允许远程登录
CREATE USER 'newuser'@'%' IDENTIFIED BY 'password';
Drop user
DROP USER ‘demo’@‘localhost’;
- Install MySQL on CentOS 7
- Install mysql on centos 7
- How to Install MySQL on CentOS 7
- How To Install MySQL on CentOS 7
- install mysql on Linux CentOs
- Install MySQL Server 5.6 on CentOS 7 / RHEL 7
- Install Apache, PHP And MySQL On CentOS 7 (LAMP)
- Install MariaDB on CentOS 7
- install Apache on CentOS 7
- Install Caffe on CentOS 7
- Install chrome on CentOS 7
- install MySQL 5.7 On CentOS 6
- centos 7 install mysql
- centos 7 install mysql
- Install xrdp on CentOS 7 / RHEL 7
- CentOS 7 yum install mysql
- install google-chrome on CentOS 7
- How To Install Docker on CentOS 7
- struct和typedef struct的区别
- Oracle入门学习(5)
- Arduino 卡片8震动探测
- 第12周 数据结构和算法 线性表-2 插入、删除、定位运算
- linux命令
- Install mysql on centos 7
- sql/plus 与 sql/plus的区别
- windbg调试命令
- linux多线程编程——同步与互斥
- Windows10 x64 环境安装配置OpenCV3.1.0和添加OpenCV_contrib库到OpenCV3.10中及重新配置环境
- JSON 解析
- cvpr2016 paper list
- Android应用程序模型:应用程序,任务,进程和线程
- android 常见错误