I installed Ubuntu Server 15.04 and MariaDB 10.0.17 on my server.
When install MariaDB, I can't see password setting page, and install is complete.
So I try to change my root password using SET PASSWORD and UPDATE table.
But, not happened.
I can access MySQL using any password and no password.
Like this:
root#kuroneko-Server:~# mysql -uroot -p
Enter password: [Type 'itsnotpassword']
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 34
Server version: 10.0.17-MariaDB-0ubuntu1 (Ubuntu)
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
I already tring flush privileges; and service mysql restart.
Reinstall ubuntu, reinstall mariadb... etc.
service mysql status:
root#kuroneko-Server:~# service mysql status
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: active (running) since 금 2015-05-22 11:17:41 EDT; 34min ago
Docs: man:systemd-sysv-generator(8)
Process: 8127 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 8158 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/mysql.service
├─8183 /bin/bash /usr/bin/mysqld_safe
├─8184 logger -p daemon.err -t /etc/init.d/mysql -i
└─8338 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
5월 22 11:17:40 kuroneko-Server systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
5월 22 11:17:40 kuroneko-Server mysql[8158]: * Starting MariaDB database server mysqld
5월 22 11:17:41 kuroneko-Server mysql[8158]: ...done.
5월 22 11:17:41 kuroneko-Server systemd[1]: Started LSB: Start and stop the mysql database server daemon.
MariaDB setting.
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
#
# * Character sets
#
# Default is Latin1, if you need UTF-8 set all this (also in client section)
#
character-set-server = utf8
collation-server = utf8_general_ci
character_set_server = utf8
collation_server = utf8_general_ci
#
# * Unix socket authentication plugin
#
# Needed so the root database user can authenticate without a password but
# only when running as the unix root user.
#
# Also available for other users if required.
# See https://mariadb.com/kb/en/unix_socket-authentication-plugin/
plugin-load-add = auth_socket.so
Does anyone know about this?
I can't find any information about this problem.
See: http://ubuntuforums.org/showthread.php?t=2275033
And execute the below sql:
USE mysql;
UPDATE user
SET password=PASSWORD('NEW_PASSWORD'),
plugin=''
WHERE user='root';
FLUSH PRIVILEGES;
PS: Because of safe consideration, the plugin field on root users was set, in order to prevent non-root user login. So cancelling that plugin will work.
The answer is right there in your config file
#
# * Unix socket authentication plugin
#
# Needed so the root database user can authenticate without a password but
# only when running as the unix root user.
#
# Also available for other users if required.
# See https://mariadb.com/kb/en/unix_socket-authentication-plugin/
plugin-load-add = auth_socket.so
The auth_socket.so allows when you are the root, to login without password prompt. So you can ideally login with just typing "mysql"
MariaDB 10.0.17 cannot access root with non-root user.
(Includ web access)
And anyone can access MariaDB root with ubuntu root user.
(Not Certification)
So make new root2 user to managed mysql on web.
Unix socket authentication plugin is built-in since 10.0.22-6
Needed so the root database user can authenticate without a password but only when running as the unix root user.
Also available for other users if required.
See https://mariadb.com/kb/en/unix_socket-authentication-plugin/
Related
I am using a VPS Ubuntu 20.04 in a2 hosting. I am trying to set up my mysql database but I am getting some error. I am doing this through a SSH. I installed mysql using
sudo apt-get install mysql-server mysql-client
and it installed just fine. But when I try to run
sudo mysql_secure_installation
it throws me this error
Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
I have tried to reinstall mysql-server, but without success. I have noticed some errors:
In my /etc/mysql/my.cnf file, it looks like is missing some code, I just have this:
It doesn't have any information about the socket.
My /var/run/mysqld/mysqld.sock file was not created when I installed the db. Not even the folder /var/run/mysqld was created. I tried to create both, but it still doesn't worked. In my example, the files are being created in a wrong way ou not even being created. I don't know why this is happening.
FIle: /etc/mysql/mysql.conf.d/mysqld.cnf
#
# The MySQL database server configuration file.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
[mysqld]
#
# * Basic Settings
#
user = mysql
# pid-file = /var/run/mysqld/mysqld.pid
# socket = /var/run/mysqld/mysqld.sock
# port = 3306
# datadir = /var/lib/mysql
# If MySQL is running as a replication slave, this should be
# changed. Ref https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_tmpdir
# tmpdir = /tmp
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
mysqlx-bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer_size = 16M
# max_allowed_packet = 64M
# thread_stack = 256K
# thread_cache_size = -1
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover-options = BACKUP
# max_connections = 151
# table_open_cache = 4000
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
#
# Log all queries
# Be aware that this log type is a performance killer.
# general_log_file = /var/log/mysql/query.log
# general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
# slow_query_log = 1
# slow_query_log_file = /var/log/mysql/mysql-slow.log
# long_query_time = 2
# log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
# server-id = 1
# log_bin = /var/log/mysql/mysql-bin.log
# binlog_expire_logs_seconds = 2592000
max_binlog_size = 100M
# binlog_do_db = include_database_name
# binlog_ignore_db = include_database_name
Is there anything I am missing? If someone could help me I would be grateful. Thank you!
For anyone who have the same error, I solve this by reinstalling my entire OS. My ubuntu version was 20.04 and I installed the 18.04 version. This solved for me.
I'm trying to port my web-app created on Windows, using Hibernate, XAMPP for Apache tomcat and mysql server, to Linux, using Docker.
After i've done the following steps, The first feature of my web.app is login/register form: On Windows all works perfectly, but with container there is latency about tens of minutes.. and sometime there is also 500 http error!!
docker run -d --name mysql-phpmyadmin -p 127.0.0.1:8686:80 -p 127.0.0.1:3306:3306 grzesiekb/mysql-phpmyadmin
docker run -d -p 8484:8080 -p 8007:8009 --name tomcat8-linked --link mysql-phpmyadmin:mysqlphp tomcat:8.0-jre8 and then deploy under webapps/ folder my warfile
In my hibernate.cfg.xml, you can see it here (i have problems to paste it in a viewable way) :)
in my mysql container my.cnf there is:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
general_log_file = /var/log/mysql/mysql.log
general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#slow_query_log_file = /var/log/mysql/mysql-slow.log
#slow_query_log = 1
#long_query_time = 2
#log_queries_not_using_indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
By default, this mysql container only allows connection from localhost: for allowing connections from everywhere, i've done:
GRANT ALL PRIVILEGES ON . TO 'root'#'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Then i've imported my dql dump via phpmyadmin
Describe the results you received:
Huge latency, related to i don't know which problem, and in a random way there is no way to connect to mysql. No logs. My teacher said that probably it's a DNS problem related to Docker network.
Describe the results you expected:
Connection to the db immediately, like in Windows using XAMPP
You should try to make your setup as standard as possible to avoid bugs due to non-standard practices.
Use official or at least popular images (with millions of pulls) instead of your mysql-phpmyadmin with a hundred pulls :
https://hub.docker.com/search/?isAutomated=0&isOfficial=1&page=1&pullCount=0&q=mysql
https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=phpmyadmin
I'm not sure why you declare ip with host port and container port, maybe don't do this if it's not necessary, publish only host port and container port, not ip.
Don't use --link since it's deprecated, create a bridge network and run each container with --network my-bridge-network.
Upgrade your Ubuntu to the latest LTS version (16.04.2) with the latest available "HWE" kernel for this LTS version (you have to upgrade kernel with a seperate command as explained here : sudo apt-get install --install-recommends xserver-xorg-hwe-16.04
I'm trying to get the general logging in mariadb enabled so i can see all the queries being generated against my database.
I'm running version 5.5 on ubuntu:
MariaDB [(none)]> show variables like '%Version';
+------------------+---------------------------------+
| Variable_name | Value |
+------------------+---------------------------------+
| innodb_version | 5.5.43-MariaDB-37.2 |
| protocol_version | 10 |
| version | 5.5.44-MariaDB-1ubuntu0.14.04.1 |
+------------------+---------------------------------+
3 rows in set (0.03 sec)
MariaDB [(none)]>
In my my.cnf file, here's what I've attempted to add in the [mysqld] section:
general-log
general-log-file=queries.log
log-output=file
The reference I was using can be found here: https://mariadb.com/kb/en/mariadb/general-query-log/
When I restart my database using "/etc/init.d/mysql restart", and I start requesting pages via my web application, I can't find any log files being generated eventhough I'm certain the database is being queried.
Any suggestions?
EDIT 1
Upon closer examination, I've noticed that the error log isn't working either.
When I restart mysql, I get the following messages:
myuser#dev:/etc/mysql$ sudo /etc/init.d/mysql restart
* Stopping MariaDB database server mysqld [fail]
* Starting MariaDB database server mysqld [ OK ]
Notice how the stop command fails. But I can't find any error logs.
This is my entire msqld section in my.cnf:
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
general-log
general-log-file=queries.log
log-output=file
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
EDIT 2
Results from "show variables like '%log%'" command is pasted here:
http://pastebin.com/Zt8xFxLN
Line 18 seems to be my problem and maybe line 30 for the error logs?
If i change these values via command line, will it only last for the current session?
Something stood out to me while reading the documentation in your first link:
By adding this to your my.cnf file all queries will be logged to the file queries.log in the datadir directory.
So, I enabled it and had a look at the contents of /var/lib/mysql (the mysql/mariadb datadir).
And there it was - queries.log
The datadir isn't exactly where I'd expect it to be either, but the docs say so. I'd rather see it in /var/log/mysql (it is a log, after all), so I changed the above configuration to a full path (/var/log/mysql/queries.log). The result is as expected, the log ends up in /var/log/mysql
yay!
Seems that things changed since this discussion. As of today, I can enable logging with
mysql -e "SET GLOBAL general_log=1;"
mysql -e "SET GLOBAL general_log_file='all_query.log';"
less +F /var/lib/mysql/all_query.log
Note that the file appears in /var/lib/mysql, rather than in /var/log/mysql ...
I ran the following command on the mysql commandline:
set global log="on"
I am trying to install mysql-server on OpenWrt.
mysql_install_db --force gives me error:
/usr/bin/my_print_defaults: can't load library 'libnsl.so.0'
FATAL ERROR: Could not find /usr/lib/mysqld
If you compiled from source, you need to run 'make install' to copy
the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top level
of the extracted archive, or pass the --basedir option pointing to
that location.
I have install Libc but I can' find libnsl.so.0 under /usr/lib
I have my.cnf under /etc/
Content of my.cnf:
root#OpenWrt:/etc# cat my.cnf
[client]
port = 3306
socket = /var/run/mysqld.sock
[mysqld]
user = root
socket = /var/run/mysqld.sock
port = 3306
basedir = /usr
############ Don't put this on the NAND #############
# Figure out where you are going to put the databases
# And run mysql_install_db --force
datadir = /mnt/data/mysql/
######### This should also not go on the NAND #######
tmpdir = /mnt/data/tmp/
skip-external-locking
bind-address = 127.0.0.1
# Fine Tuning
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
#expire_logs_days = 10
#max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
I also created mkdir /usr/lib/mysqld folder.
drwxr-xr-x 2 root root 4096 Mar 19 17:39 mysqld
Then I get error:
/usr/bin/my_print_defaults: can't load library 'libnsl.so.0'
Installing MySQL system tables...
/usr/bin/mysql_install_db: line 418: /usr/lib/mysqld: Permission denied
Installation of system tables failed! Examine the logs in
/var for more information.
You can try to start the mysqld daemon with:
shell> /usr/lib/mysqld --skip-grant &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!
I also tried:
cd /usr/lib
wget http://trac.augsburg.freifunk.net/export/3/trunk/freifunk-openwrt-kit-1.6.20-de/root/lib/libnsl.so.0 libnsl.so.0
Then I get error:
'/usr/lib/libnsl.so.0' is not an ELF file
I do not know what to do any more.
Please give me some idea! Thanks!
UPDATE:
I have updated opkg.conf
Removed mysql-server
And istall mysql-server from new url provided in opkg.conf
mysql_install_db works now great.
I can start mysqld without error BUT
I CANT CHANGE ROOT PASSWORD
/usr/bin/mysqladmin -u root password 'xxxxxxxxx'
/usr/bin/mysqladmin: can't load library 'libnsl.so.0'
any other option to change mysql root password?
UPDATE2:
Install: http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/libmysqlclient_5.1.53-7_ar71xx.ipk
WORKS!!!!
I have been trying to make multiple instances of mysql on ubuntu. These are the steps I followed.
mv /etc/init.d/mysql /etc/init.d/mysql_mono.server
cp /usr/share/mysql/mysqld_multi.server /etc/init.d/mysql
With your favourite text editor, edit /etc/init.d/mysql, then find the lines:
basedir=/usr/local/mysql
bindir=/usr/local/mysql/bin
And change to:
basedir=/usr
bindir=/usr/bin
If your have a root password in localhost, edit the file /usr/bin/mysqld_multi, then find the line:
$opt_password = undef()
And change to:
$opt_password = "password"
changing "password" by the 'root'#'localhost' password.
Now create a database directory for each additional mysqld instance:
# cp -pr /var/lib/mysql /var/lib/mysql1
# cp -pr /var/lib/mysql /var/lib/mysql2
My configuration file(my.cnf) is:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld1]
user = root
pid-file = /var/run/mysqld1.pid
socket = /var/run/mysqld1.sock
port = 3301
datadir = /var/lib/mysql1
log = /var/log/mysql/mysql1.log
server-id = 1
log_bin = /var/log/mysql/mysql1-bin.log
[mysqld2]
user = root
pid-file = /var/run/mysqld2.pid
socket = /var/run/mysqld2.sock
port = 3302
datadir = /var/lib/mysql2
log = /var/log/mysql/mysql2.log
server-id = 2
log_bin = /var/log/mysql/mysql2-bin.log
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
log_error = /var/log/mysql/error.log
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
``!includedir /etc/mysql/conf.d/
Still I get this error when i run following command:
mysql --socket=/var/run/mysqld1.sock -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld1.sock' (2)
via http://dev.mysql.com/doc/refman/5.5/en/multiple-unix-servers.html
One way is to run multiple MySQL instances on Unix is to compile
different servers with different default TCP/IP ports and Unix socket
files so that each one listens on different network interfaces.
Compiling in different base directories for each installation also
results automatically in a separate, compiled-in data directory, log
file, and PID file location for each server.
Assume that an existing 5.1 server is configured for the default
TCP/IP port number (3306) and Unix socket file (/tmp/mysql.sock). To
configure a new 5.5.35 server to have different operating parameters,
use a CMake command something like this:
shell> cmake . -DMYSQL_TCP_PORT=port_number \
-DMYSQL_UNIX_ADDR=file_name \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.5.35