NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

mfe_'s avatar
mfe_
Tutor
Feb 28, 2012

under which user runs mysql?

Hello,

because the system partion haven't enough space, i decide to move the datadir from mysql from /var/lib/mysql to /www/mysql

But now i got the following issue:

/usr/bin/mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Last time when mysql didn't worked it was an permission issue. So I need to know under which user mysql is running? At the moment I set
all files /directorys which are correspondending with mysql to admin:admin
-rw-r--r-- 1 root root 2.0K 2012-02-27 14:55 /etc/mysql/my.cnf
ls /c/www/mysql/ -lah total 39M

ls /var/run/mysqld/ -lah
total 32K
drwxrwxrwx 2 admin admin 16K 2012-02-27 13:45 .
drwxr-xr-x 12 root root 16K 2012-02-28 16:46 ..




[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
#
# * Basic Settings
#
user = admin
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
#datadir = /var/lib/mysql/
datadir = /c/www/mysql/
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
skip-name-resolve

# 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
#skip-networking



The log files are empty. Have anyone a idea why mysql isnt running?

greetings

2 Replies

Replies have been turned off for this discussion
  • If you login to the nas with ssh, then try to start mysqld on the command line, you should see any errors displayed which prevent it from starting.
  • Ah okay i mixed up mysql and mysqld.... :S

    Executing mysqld seems working

    whereis mysqld
    mysqld: /usr/sbin/mysqld
    fes-a120d19nas:~# /usr/sbin/mysqld
    120229 9:49:46 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    120229 9:49:47 InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 26799518.
    InnoDB: Doing recovery: scanned up to log sequence number 0 26799518
    InnoDB: Last MySQL binlog file position 0 98, file name /var/log/mysql/mysql-bin.000219
    120229 9:49:47 InnoDB: Started; log sequence number 0 26799518
    120229 9:49:47 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.0.24a-Debian_3.infrant1-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Infrant ReadyNAS distribution

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More