Received this warning when installing MySQL:
Warning: m4 macros were installed to "share/aclocal".
Homebrew does not append "/usr/local/share/aclocal"
to "/usr/share/aclocal/dirlist". If an autoconf script you use
requires these m4 macros, you'll need to add this path manually.
Managed to start MySQL in safe mode using:
# cd . ; ./bin/mysqld_safe &
However, I can't start the server normally by trying:
# mysql.server start
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/robell.local.pid).
Also noticed that this file doesn't exist:
# launchctl load -w /usr/local/Cellar/mysql/5.5.19/com.mysql.mysqld.plist
launchctl: Couldn't stat("/usr/local/Cellar/mysql/5.5.19/com.mysql.mysqld.plist"): No such file or directory
nothing found to load
brew info mysql
will list a few steps that are required prior to starting the server, due to the subtleties of permissions and how Homebrew never uses sudo. Good luck.
Related
I am on FreeBSD 10.2 32 bit and installed the newest version of mysql with the following command:
pkg install mysql57-server-5.7.12
Now, when I try to start mysql:
service mysql-server start
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
I am getting this error. I hope you can help me.
Check your /var/db/mysql folder, if it contains files, make a backup and delete dir content:
rm -rf /var/db/mysql/*
Then do a data directory initialization:
/usr/local/libexec/mysqld --initialize --user=mysql
You should get a new temporary password, write it down, then start mysql-server
service mysql-server start
After mysql starts, secure the installation via:
/usr/local/bin/mysql_secure_installation
Open /etc/rc.conf and append or modify this line :
mysql_enable="YES"
Save the file, close it and retry to start the server.
I've been running mysql55 (5.5.30) under homebrew for a while, and yesterday I updated it to 5.5.44 using brew upgrade mysql55. Now, I am unable to log into mysql or even get it running. Important notes:
1) After running, I got the The post-install step did not complete successfully
You can try again using 'brew postinstall homebrew/versions/mysql55' and This formula is keg-only, which means it was not symlinked into /usr/local. message. Running the suggested command doesn't seem to do anything.
2) Running mysql.server start worked fine before. Now I get command not found when I try to run any mysql command. I also ran launchctl unload and then load on the plist file. I can start mysql using /usr/local/opt/mysql55/bin/mysql but I can't connect with my client using /tmp/mysql.sock (I get access denied). I tried adding /tmp/mysql.sock, but that doesn't make a difference.
3) My current data is stored in /usr/local/var/mysql (it has directories for all my current dbs), but there is a new /user/local/var/mysql55 directory with the default test, mysql, and performance_schema directories.
4) I tried modifying the mysql55.plist file to point to /usr/local/var/mysql as the data dir, and unloading and loading it again with launchctl, but I still get nothing.
5) My path has /usr/local, and the only difference I can see between now and pre-upgrade is the new data directory. The output from brew upgrade shows the command /usr/local/Cellar/mysql55/5.5.44/bin/mysql_install_db --verbose --user=steve --basedir=/usr/local/Cellar/mysql55/5.5.44 --datadir=/usr/local/var/mysql55 --tmpdir=/tmp was run. I modified it to point to the current data dir (--data-dir=/usr/local/var/mmysql), and it seemed to run ok, but I still don't get anything when I run mysql. The previous version was 5.5.30, so it seems that something is still linked to that directory.
What do I need to do just to get mysql.server to work again, using my current data directory of /usr/local/var/mysql?
Thanks.
I ran the mysql_install_db a couple times with --datadir=/usr/local/var/mysql to no effect, so I ended up just adding
basedir = /usr/local/Cellar/mysql55/5.5.44
datadir = /usr/local/var/mysql
to /etc/my.cnf, and it finds the data directory fine now.
I have problem mysql starting, i was update to El captian on mac.
In terminal,
brew install mysql
mysql.server start
but it not working
this is error message.
Starting MySQL... ERROR! The server quit without updating PID file(/usr/local/var/mysql/Heo-MacBook-Pro.local.pid).
help me please!
I had the same problem using brew command to start mysql service.
If you are using MacOS, go to System Preferences and click on MySQL icon. Probably you'll see information message about permission denied in some directories. All you need to do is to give permission to that.
That's worked for me.
Open your terminal
Execute this command: sudo chown -R mysql /usr/local/mysql/data
Try this first:
/usr/local/var/mysql/support-files/mysql.server restart
If that doesn’t fix
Remove or backup the /etc/my.cnf
also try this method:
sudo /usr/local/var/mysql/support-files/mysql.server start
Starting MySQL
. ERROR! ....................
remove the .err files like so:
rm *.err /usr/local/var/mysql/data/
Solution working for my case:
Check your error log at /usr/local/var/mysql/Heo-MacBook-Pro.local.err
If there is something like this in the log: ...[Note] Unable to delete pid file: Permission denied..., which means mysql does not have the permission to your mysql folder
Use the following command in terminal to grant the permission: sudo chown -R mysql /usr/local/var/mysql/
The Problem could also be a version mismatch. My db was installed with Homebrew as version 5, later unintentionally upgraded to version 8.
Check the most recent error log at /usr/local/var/mysql/<your-computers-name.some.domain>.err
You can conveniently read the last couple of lines (e.g. 40) of the file with tail -n 40 <your-computers-name.some.domain>.err
You may find a hint about upgrading istructions in this case.
I have installed kamailio with the mysql, presence, nat, auth modules. All of them works on another Server(Amazone Ec2). Now i'm trying it on an Notebook, and get some problems.
When i try to start kamailio with the kamctl command:
sudo kamctl start
INFO: Starting Kamailio :
ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start failed
I have already tried, to touch this file, change settings for the mysql db, and searched other solutions on the web. But nothing helped me.
Look in syslog file for error messages printed by Kamailio, you should get hints about the reason why is not starting -- syslog can be /var/log/syslog (debian like distros) or /var/log/messages (centos like distros).
You can also try to start it printing log messages to the terminal, something like:
kamailio -M 8 -E -e -dd
Then error messages can be seen directly.
Try to create a kamailio folder in the /var/run/ directory.
mkdir /var/run/kamailio
# Used kamailio 4.3.1 installed from source.
# Used this command to start:
/usr/local/sbin/kamctl start
I seem to be having an issue getting MySQL 5.6.1.5 to install from Source. I am running RHEL 6.
I was able to perform the cmake, make, and make install without issues.
I am attempting to run the mysql_install_db binary and when I do I get the following error:
Fatal ERROR: Could not find ./bin/my_print_defaults
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 bat at the top level of the
extracted archive, or pass the --basedir option pointing to that location.
So I did a check for my_print_defaults using which my_print_defaults, unfortunately it was not found on my machine.
I did a locate my_print_defaults as well just for the heck of it and said it was located in /usr/bin/my_print_defaults, however, when I checked /usr/bin for the binary, it was not actually there.
I would try to use mysql_install_db --basedir=/usr/bin but I know this won't work as the which and locate commands confirm my_print_defaults isn't on my machine.
I looked at mysql_install_db giving error, but that error was not similar to this one.
Please ignore question, I didn't bother to try running find / -name my_print_defaults and found it in /usr/local/mysql/bin/
I searched packages for my_print_defaults with
apt-file search my_print_defaults
If my_print_defaults is missing on your system (which my_print_defaults), first find out which db is installed with:
dpkg -l |grep -E 'maria|mysql'|grep ii|grep server
If you have installed mariadb, try reinstall mariadb:
sudo apt install --reinstall mariadb-server-core-10.1
If you don't find a solution with mariadb, swap back to mysql with
sudo apt install mysql-server