标签:ati mysql设置密码 操作 mariadb star mct 出现 用户 securecrt
https://dev.mysql.com/downloads/mysql/5.5.html
注意:Select Operating System: Red Hat Enterprise Linux / Oracle Linux
例如:MySQL-server-5.5.62-1.el7.x86_64.rpm
MySQL-client-5.5.62-1.el7.x86_64.rpm
1,useradd mysql
2,groupadd mysql
mysqladmin --version
mysqladmin Ver 9.0 Distrib 5.5.64-MariaDB, for Linux on x86_64 ------> 表示安装成功
systemctl start mysql.service
Failed to start mysql.service: Unit not found. --------> 出现问题不要着急
在CentOS7中已经不在支持mysql,就算你已经安装了,CentOS7还是表示很嫌弃
yum install -y mariadb-server
Transaction check error: -------> 执行上面命令,出现这个问题,说明版本冲突,仔细查看上面显示的问题
rpm -e 出现问题的版本 -------> 删除出现问题的版本
例如:rpm -e MySQL-client-5.5.62-1.el7.x86_64.rpm
再次执行 yum install -y mariadb-server
systemctl start mariadb.service
可能会出现 ---------> Job for mariadb.service failed because the control process exited with error code. See “systemctl status mariadb.service” and “journalctl -xe” for details.
解决问题:cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
/usr/bin/mysqladmin -u root password 123
登陆mysql
mysql -u root -p
Enter password: 123
显示如下登陆成功:
Welcome to the MariaDB monitor. Commands end with ; or \g. ? Your MariaDB connection id is 7 ? Server version: 5.5.64-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
MariaDB [(none)]>
systemctl enable mariadb.service
首先将mysql的配置文件my-huge.cnf复制到/etc下
cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
在/etc/my.cnf/ 下添加如下代码:
[client]
default-character-set=utf8
[mysqld]
character_set_server=utf8 character_set_client=utf8 collation-server=utf8_general_ci
[mysql]
default-character-set=utf8
Linux(CentOS 7)中安装mysql-5.5.62
标签:ati mysql设置密码 操作 mariadb star mct 出现 用户 securecrt
原文地址:https://www.cnblogs.com/xiaowenwen/p/11875912.html