I am running MySQL server on FreeBSD. This is why I installed the binary. $> mysqladmin -h host_name variables. I installed a few other packages (PKG install) which were not MySQL related but after doing this MYSQL server will not start. What i did was to login as user "mysql" and see if i can change to MySQL data directory folder, if you have problem . The solution is simple. See Section 5.4.2.8, "Error Logging to the System Log" . Then copy the contents of /usr/local/mysql/data to /var/lib/mysql/data and start mysqld. mohaaron June 6th, 2011, 07:26 PM Unfortunately mysql 5.5 is still not available as a package. The following answer is referenced from the above question. Thank you for a problem report. SELECT CONCAT(QUOTE(user),'@',QUOTE(host)) from mysql.user WHERE user='root'; because you do not have remote rights to the mysql database. adding r permission the following lines to /etc/apparmor.d/usr.sbin.mysqld inside /usr/sbin/mysqld section, it so will be : /proc/*/status r, /sys/devices/system/node/ r, and then you can reload apparmor using, service apparmor reload and start again your MySql using, service mysql start EDIT Find your MySQL Data Directory, Fix Permissions 1 2 3 4 5 6 7 8 9 10 11 12 13 This setting will prevent MySQL from writing to any folder under /home and thus it will throw ErrNo 13: Permission Denied errors on startup. 1. Hi I just installed Mac OS X 10.4 (PowerPC) Standard 5.0.19 from the Mac OS X package installer and when I attempt perform the initial user setup steps (running mysqld_safe --user=mysql &) I get the following errors. mysql -h x.x.x.x -uroot --database=abc you evidently do not have remote rights to database . ERROR! In /var/log/syslog I get /usr/bin/mysqld_safe: cannot create /var/log/mysqld.log: Permission denied I am just testing out a new Ubuntu (Vivid 15.04) install on Vagrant, and getting problems with mysql and logging to a custom location. This condition should be met if you execute mysqld_safe from your MySQL installation directory (for example, /usr/local/mysql for a binary distribution). If this don't resolve the problem, you need to check permission for parent folder. The error was caused by the table files in my MySQL data directory being owned by the wrong user so MySQL couldn't properly read them. All folders except data and mysql-files: My home user; data and mysql-files: mysql; Groups are the same as the owners. If the server and databases cannot be found relative to the working directory, mysqld_safe attempts to locate them by absolute path names. GRANT ALL PRIVILEGES ON `mydb`. This is no longer true. The secure_file_priv system variable limits import and export operations to a specific directory. Use the server log_syslog_tag system variable instead. chmod - R 700 / var / lib / mysql. Replace /var/lib/mysql with path to mysql data directory. Reason: Probably the folder /usr/local/mysql/ don't have the write permissions for the user _mysql. $> mysqladmin variables. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when I typed "mysql" 11 Mysql connect to server: Access denied for user root@localhost --timezone= timezone Set the TZ time zone environment variable to the given option value. Update: changing /usr/local/mysql permissions let me initialize/start the server, but I still can't connect to it on any user (even root@localhost gets Access Denied), when I removed /usr/local/mysql link and redirected all . Using this option to control mysqld logging is deprecated. sudo chown -R _mysql:admin /usr . In this case, you change the permissions for the involved files and directories so that the server has the right to use them. I began by following <a href . This question already have the answer here: MySQL server start issues on Mavericks. Consult your operating system documentation for legal time zone specification formats. Once you determine the path settings you want, start the server without --verbose and --help . # Change ownership of binaries to root and ownership of the data directory to the user that you will run mysqld as: shell> chown -R root /usr/local/mysql shell> chown -R mysql /usr/local/mysql/var shell> chgrp -R mysql /usr/local/mysql Hello all, this is my first mysql install on my machine (powerbook g4 15" with mac os x 10.4). mysql Starting MySQL. The server quit without updating PID file (/usr/local/ If you get Errcode 13 (which means Permission denied) when starting mysqld, this means that the privileges of the data directory or its contents do not permit server access. And so far, it's not going very well. cd /usr/local/mysql Within this directory are several files and subdirectories, including the bin subdirectory that contains the server as well as client and utility programs. If mysqld is currently running, you can find out what path settings it is using by executing this command: Press CTRL+C to copy. It should either start right up, or it may update the format of the databases first, then start. Try changing the folder permission by using the following commands. You only have remote rights to mydb. The fix is to either move the data dir out of /home, or otherwise to turn off this security feature in the systemd service file: 2. chown - R mysql:mysql / var / lib / mysql. Please, send the results of the following commads: ls -l /var/run ls -l /var/run/mysqld I think, it is not a bug, but just a result of call with "-user=mysql". Or: Press CTRL+C to copy. If I rung the binary directly I get these errors: root@FAMP:/var/db # /usr/local/libexec/mysqld * TO 'root'@'%' WITH GRANT OPTION; When you ran.