安装完成后启动
[chazhengwen@IIMare my.cnf.d]$ systemctl status mariadb.service
mariadb.service - MariaDB 10.0 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 四 2016-03-03 15:03:42 CST; 1h 10min ago
Main PID: 16123 (code=exited, status=0/SUCCESS)
3月 03 15:03:41 IIMare systemd[1]: Starting MariaDB 10.0 database server...
3月 03 15:03:41 IIMare mysqld_safe[16123]: 160303 15:03:41 mysqld_safe Logg....
3月 03 15:03:41 IIMare mysqld_safe[16123]: 160303 15:03:41 mysqld_safe Star...l
3月 03 15:03:42 IIMare systemd[1]: mariadb.service: Control process exited...=1
3月 03 15:03:42 IIMare systemd[1]: Failed to start MariaDB 10.0 database s...r.
3月 03 15:03:42 IIMare systemd[1]: mariadb.service: Unit entered failed state.
3月 03 15:03:42 IIMare systemd[1]: mariadb.service: Failed with result 'ex...'.
3月 03 15:39:32 IIMare systemd[1]: Stopped MariaDB 10.0 database server.
3月 03 15:45:50 IIMare systemd[1]: Stopped MariaDB 10.0 database server.
3月 03 16:14:03 IIMare systemd[1]: Stopped MariaDB 10.0 database server.
Hint: Some lines were ellipsized, use -l to show in full.
登陆出错
[chazhengwen@IIMare ~]$ mysql -root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
安装完成后socket默认
[chazhengwen@IIMare mysql]$ cat /etc/my.cnf.d/mariadb-server.cnf
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#
# this is read by the standalone daemon and embedded servers
[server]
# this is only for the mysqld standalone daemon
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld/mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
# this is only for embedded server
[embedded]
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
# This group is only read by MariaDB-10.0 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.0]
但是socket路径不再/var/lib/mysql/mysql.sock,默认安装在什么地方
[root@IIMare mysql]# cd /var/lib/mysql
[root@IIMare mysql]# ls
aria_log.00000001 client-cert.pem ib_logfile1 server-cert.pem
aria_log_control client-key.pem mysql server-key.pem
auto.cnf ib_buffer_pool performance_schema sys
ca-key.pem ibdata1 private_key.pem
ca.pem ib_logfile0 public_key.pem