安装并初始化MySql

sudo pacman -S mysql

正在安装 mysql-clients (8.0.11-1)...
正在安装 mysql (8.0.11-1)...
:: You need to initialize the MySQL data directory prior to starting
   the service. This can be done with mysqld --initialize command, e.g.:
   mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysql
:: Additionally you should secure your MySQL installation using
   mysql_secure_installation command after starting the mysqld service

 

初始化MySql数据目录 控制台会输出root临时密码 注意记录

mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysql
 

查看MySql状态

sudo systemctl status mysqld

启动MySql服务/开机自启

sudo systemctl enable mysqld

sudo systemctl start mysqld

连接工具

1.mysql workbench
2.manjaro 商店搜索 dbeaver

 dbeaver 安装根据步骤走一般不会出错 如果使用root链接可能提示  Public Key Retrieval is not allowed  

解决: 将allowPulicKeyRetrieval 设置为true  或者切换非root用户

  

 

 

 

 

安装并初始化MySql

sudo pacman -S mysql
正在安装 mysql-clients (8.0.11-1)...
正在安装 mysql (8.0.11-1)...
:: You need to initialize the MySQL data directory prior to starting
   the service. This can be done with mysqld --initialize command, e.g.:
   mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysql
:: Additionally you should secure your MySQL installation using
   mysql_secure_installation command after starting the mysqld service

初始化MySql数据目录/注意记录root临时密码

mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysql

查看MySql状态

sudo systemctl status mysqld

启动MySql服务/开机自启

sudo systemctl enable mysqld
sudo systemctl start mysqld


作者:绍重先
链接:https://www.jianshu.com/p/12c871f937f7
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
posted on 2020-01-06 20:16  博客园197  阅读(2190)  评论(0编辑  收藏  举报