Configuration Modification of MariaDB database storage path

Source: Internet
Author: User

Configuration Modification of MariaDB database storage path

MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
This problem is generally caused by three reasons:
1: some files in the configuration are not authorized enough. Change all files involved in the configuration to mysql user permissions.
2: No pid for mysql running. rm-rf/var/lock/subsys/mysql. The default permission for recreating a new pid file is 660.
3: my. cnf configuration file is incorrect and needs to be modified again

Can't open and lock privilege tables: Table 'mysql. user' doesn' t exist
This problem occurs because there is no built-in database in the myql file to store. You can enter mysql_install_db.
Or change the database path to the default/var/lib/mysql directory.

The following is my mariadb configuration (from the database)

[Client]
Port = 3306
Socket =/var/lib/mysql. sock
Default-character-set = utf8


[Mysqld_safe]
Socket =/var/lib/mysql. sock
Nice = 0


[Mysqld]
User = mysql
Pid-file =/var/run/mysqld. pid
Socket =/var/lib/mysql. sock
Log_error =/var/log/mysqld/error. log
Port = 3306
Basedir =/usr
Datadir =/data
Tmpdir =/tmp
Lc-messages-dir =/usr/share/mysql
Skip-external-locking
Bind-address = 0.0.0.0
Skip-name-resolve
Lower_case_table_names = 1
Max_connections = 1000
Connect_timeout = 15
Wait_timeout = 600
Max_allowed_packet = 16 M
Thread _ cache_size = 128
Sort_buffer_size = 16 M
Bulk_insert_buffer_size = 16 M
Tmp_table_size = 128 M
Max_heap_table_size = 128 M
Query_cache_limit = 0
Query_cache_size = 0


Long_query_time = 10


Log_bin =/var/log/mysqld/mysql-bin
Log_bin_index =/var/log/mysqld/mysql-bin.index


Expire_logs_days = 10
Max_binlog_size = 100 M


Binlog_ignore_db = mysql
Server_id = 5005
Log_slave_updates = 1
Slave_skip_errors = all
# Auto_increment_offset = 1
### Auto_increment_increment = 2
# Binlog_format = row
#
##
# Replicate-do-db =
# Key_buffer_size = 1024 M
##
#
# Collation-server = utf8_general_ci
# Init-connect = 'set NAMES utf8'
# Character-set-server = utf8
#
# Default_storage_engine = InnoDB
# Innodb_buffer_pool_size = 30720 M
# Innodb_log_buffer_size = 32 M
# Innodb_file_per_table = 1
# Innodb_open_files = 400
# Innodb_io_capacity = 400
# Innodb_flush_method = O_DIRECT
# Innodb_flush_log_at_trx_commit = 2
# Innodb_log_file_size = 512 M
#
# Key_buffer = 16 M
# Thread_stack = 192 K
# Myisam-recover = BACKUP
#
# [Mysqldump]
# Quick
# Quote-names
# Max_allowed_packet = 16 M
#
# [Isamchk]
# Key_buffer = 16 M
##

Linux Tutorial: How to check the MariaDB server version

Implementation of MariaDB Proxy read/write splitting

How to compile and install the MariaDB database in Linux

Install MariaDB database using yum in CentOS

Install MariaDB and MySQL

How to migrate MySQL 5.5 database to MariaDB 10 on Ubuntu

Install MariaDB on the Ubuntu 14.04 (Trusty) Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.