When I start MAMP in one user account the Apache and MySQL servers start correctly but in another account only the Apache server starts.
The computer has a number of applications installed but nothing else. Any idea what difference I should be looking for between the two accounts?
MAMP 4.2.1 installed on a Mac running High Sierra (10.13). Hard drive securely erased and clean install of MacOS 10.13.
If I understand your question right, you have two user accounts which you want to use for Apache and MySQL server but one of them isn't able to run MySQL.
Looks like it is a user permission issue. You need to add and grant user the proper access in MySQL. Check these links:
MySQL: https://dev.mysql.com/doc/refman/5.7/en/adding-users.html
Apache: http://ifmeister.com/mamp-file-permissions-for-a-local-development-environment/
Related
I'm using wsl2 on a windows machine. I want to view my databases that I have on mysql server ubuntu in a GUI such as mysql workbench (on windows) but it seems as the two are not linked. In the pictures provided you can see that when I login to root, it displays different databases, I also use different passwords for root on both servers. When I try to use the root password from the ubuntu server in workbench, I get the error that I cannot connect to the database server.
Ubuntu databases
MySql workbench databases
MySql workbench config
MySql workbench error
UPDATE 2022
I found myself in this same need, and found a good resource that tackles this issue rather nicely. The solution itself predates even this question, funnily enough.
Long story short, check the following GitHub repository. Instructions are available and I can confirm it works on Windows 10.0.19041.1415 and WSL2.
https://github.com/shayne/go-wsl2-host
========================================================
WSL doesn't use the same IP as Windows, meaning you can't access it using localhost. Also, WSL IP changes everytime you boot it, meaning that the credentials for the connection will work only once.
In the sister community SuperUser, this has been discussed and some workarounds are avaliable, but I can't tell if they will work specifically with MySQL Workbench, as they ofter require you to use PowerShell/CMD.
Please, refer to the following discussions, which also provide further sources on the topic (There is one in particular that might be useful if you are running Windows 10 Pro).
Make IP address of WSL2 static
localhost and 127.0.0.1 working but not ip address in wsl windows 10
There are several requests to allow us to set WSL IP statically, so we can register it as a host in Windows DNS Host file and use that alias instead of the IP while setting up a connection (or use the IP itself, since it would be static anyway), but it is not ready yet AFAIK.
After reading the answer from #Jetto, I thought you could create a batchfile like this:
#ECHO OFF
wsl export wsl=$(hostname -I); sed -i -e "s/172.[0-9]*.[0-9]*.[0-9]*/${wsl/ /}/g" /mnt/c/Users/*username*/AppData/Roaming/MySQL/Workbench/connections.xml
This will replace the ip-address to the current ip-address of your wsl instance (relying on the fact that is starts with 172.)
If you start MySQL Workbench after running this script, you should be able to connect to MySQL (or MariaDB) which is running in the WSL2 session.
Disclaimer: I am not responsible for the fact that you did not make a backup of the file connections.xml ๐
P.S. In case you wonder: Yes this instance on my computer uses port 3356. But 3306 should work too if you do not have a local MySQL running.
Good Morning Stack Exchange!
Trying to get mysql installed on my personal computer and I've run into a few issues.
I can not create a user during install, If I try to add a user during install it fails on the create users step. So I figure I will just add the users after install via sql workbench, which brings me to number 2.
After installing mysql server, attempting to connect to the server with mysql workbench just asks me for the password endlessly until it locks me out. I know the password I'm using is correct because when I modify the mysql server instance via the installer it asks for the current root password, adn the password works there.
After install, if I stop the mysql service from running mysql workbench loads without issue.
Mysql installer can not stop the mysql service, to modify an install I have to manually stop the service.
The common thread to all of these issues is the windows service for mysql.
Troubleshooting steps
verified port 3306 was open in the firewall
disable firewall entirely
Turned off anti-virus
uninstalled anti-virus
Multiple restarts of both the service and computer
Uninstalled all my sql components and reinstalled (multiple times)
changed the root password via command shell (via This MySQL guide for recovering the root password)
Downloaded the installer again in case there was a corruption of my original file.
So I'm pretty stumped, I've been at this for two days and I don't feel any closer to a solution.
Configuration info:
windows 10 (intel core i-5, 16 gigs of ram, 96 gigs of open space on SSD)
MYSql Installer version 8.0.13.0
The first thing I would check is the logs.
However, given the info you provided it sounds like default settings are there but no root#localhost user password or root#127.0.0.1.
Check the my.ini existence for details and logs.
You may have to follow this to create the config file if it doesnโt exist - follow the link below.
https://dba.stackexchange.com/questions/21835/mysql-workbench-asking-for-password
Error log location in windows:
The error log is located in the data directory specified in your my.ini file. The default data directory location is C:\Program Files\MySQL\MySQL Server......
I am using MAMP Pro and I am having an issue where I cannot find existing databases on Sequel Pro, nor can I create new databases. However, on phpmyadmin, I can see and edit the existing databases and create new ones without any issue. I believe the issue lies with the mysql version on Sequel Pro.
As you can see, on the left, phpmyadmin is running on the MySql server version 5.6.35, as is MAMP Pro, which is in the center of the image. However, Sequel Pro, at the bottom of the image, is running on MySql server version 5.7.18.
I really appreciate any help that can be given, I am close to tearing my hair out!
Thank you!
Clearly the problem is that you're connecting to two different MySQL instances.
Unless you have a good reason to run two MySQL servers on your computer, you should consolidate the databases and remove one. That way you don't get confused when trying to connect. Perhaps you had MAMP installed and also installed another MySQL server; or vice versa. Be careful not to remove the datadir from the MySQL server you're using though, and take backups before you do anything. That's aside from the actual problem, anyway.
You can use the STATUS SQL command to see the connection information โ it looks like Sequel Pro is connected via a socket, and STATUS will tell you the path to the socket. Run the command from phpMyAdmin as well to see how it's connecting (it's going to be socket or TCP/IP networking); you can the configure Sequel Pro to connect using the same connection settings phpMyAdmin is using. You could, if you really wanted to, run multiple MySQL instances alongside each other and configure your clients to connect to the proper one (phpMyAdmin at least allows connecting to multiple servers, I assume Sequel pro does as well). You'd use either a different socket or different network port numbers for each server instance โ as well as a different datadir for each, since MySQL would not deal well with sharing the data between different versions of the server, especially if they're running concurrently.
To summarize, tell Sequel Pro to connect using the same settings phpMyAdmin is using.
EDIT:
You've determined that MAMP and phpMyAdmin are connecting via the socket /Applications/MAMP/tmp/mysql/mysql.sock โ which means they're using the MySQL installed by MAMP (presumably you've installed another MySQL server independently of that). From the Sequel Pro "QUICK CONNECT" page, click over to the "Socket" tab and enter the correct socket like so:
I believe the "Name" field can be anything you prefer, although I don't really know this software program.
If you every use other software, try to remember that '127.0.0.1' and 'localhost' are two very different things to MySQL; the first one always implies using TCP/IP networking and the latter uses sockets (Sequel Pro seems to deal correctly with it so it's not relevant on this connection screen). You, of course, want 'localhost' since you're using sockets.
I am a a newbie to database programming and I want to try out MySQL.
I just installed MySQL from the official website, I am running mac 10.8.2.
Anyways, whenever I try to run a simple command like $>mysql.server start
it says Permission denied.
I am able to open it through sudo but I would love to get this fixed as this is annoying me, that it wont work properly. I have been searching for the last two hours without finding a fix, so I was hoping anyone could give me a helping hand.
The easiest way is to install the MySQL Startup Item. Then you get a Preference pane for MySQL.
See http://dev.mysql.com/doc/refman/5.5/en/macosx-installation-startupitem.html for full instructions.
Re your comment:
It's often required for services like mysql.server need to run as a uid other than your user login. For instance, the MySQL data directory may only be writeable by the mysql uid. So starting such a service must be done from a user that can change the uid of the process. The root uid can do that, so it's necessary to use sudo to launch service processes like mysql.server.
TL;DR: YOU HAVE TO USE SUDO.
If you a absolute newbie to MYSQL and you just want to use the MYSQL server to test your code on you local MAC I would advice you to take a look at XAMPP / MAMP. Xampp offers a complete out of the box install for everything you need for a development servers (Apache server, MySQL, PHP, etc). Note, that I XAMPP / MAMP is not suitable for production server setting.
I personally use the XAMPP Windows version. I haven't tried MAMP but I have come across it many times . The XAMPP for Mac version seem not to have been update for a while so I suggest you give MAMP a try.
You could of course try to get your current install to work but that might require some work. Also with regard to firewall / security issues. With the out of the box version you will have to do a lot less. Why reinvent the wheel if you can easily install a out of the box version.
I'm attempting (and failing) to upgrade MySQL on Mac OS X Server (Leopard) and running into trouble. Though the OS X Server docs say it's "normal" to have multiple versions of MySQL on your machine they don't go into any detail of how to "manage" them.
I have built and installed a newer version (5.1.40) than the original that Apple bundled (5.0.x).
Server Admin seems to manage only the initial (5.0.x) installation in /usr/bin
So I've STOPPED that version in Server Admin but can't get the new one (in /usr/local/mysql) to work.
Ideally I'd like to point the new version of mysql at the old database files in /var/mysql but not sure how...
Edit: Looks like my new MySQL is active (for some users anyway) but it's pointing to a different data file. It's pointing to /usr/local/mysql/data and I want it to point to /var/mysql
Admin user can connect but others get: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). I'm assuming because this new database doesn't have those users enabled yet?!?! though I'd think I could still $ mysql -u root -p to it?!?
Anyone know how to manage this?
Well, I renamed the new MySQL's data directory to data.backup and then I created a symlink from where the new MySQL's data folder was to /var/mysql (where the old data file is) and so far so good... New version of MySQL is running and using the existing data file for its databases...
I'm not sure how to resolve your issue, but maybe you could trying using Homebrew or another OS X package manager to handle your software.
Will make upgrading in future a breeze.
EDIT: Sorry, just realized you are using OS X SERVER, I'm not familiar with it or if you should be using Homebrew on it.