Related
On my Mac PC, I have installed MySQL and SQL Developer as well as the MySQL Connector/J, the official JDBC driver for MySQL, so that the MySQL tab appears in the connection window of SQL Developer.
In the SQL Developer connection window, I am filling in the following details
Connection name: test
Username : root
Password: xxxxx
In the MySql tab within this connection window, the hostname and port is auto populates the values localhost and 3306.
There is a button called 'Choose Database', when I click on this button I am getting the below error message in red color
"Status : Failure - The server time zone value 'AEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specific time zone value if you want to utilize time zone support"
How do I fix this issue so that I can connect to the MySql database from SQL developer?
PS: I am currently based in Sydney, Australia.
The problem got resolved by adding the below entries in the below mentioned file. In the new mysql database installations, this file would not be present so create the file so you will have create new plain text file with root privileges. When you start the MySQL server, this file will be read every time. The value specified below is a global parameter.
/etc/my.cnf
[mysqld]
default-time-zone='+10:00'
The single quotes should typed in not copy pasted.
And then restart the MySQL server.
Upvote to Nitin Puthran's answer.
If you have a Homebrew installation of mysql, my.cnf is in the Cellar mySql directory (not etc). For my version this is:
/usr/local/Cellar/mysql#5.6/5.6.41/my.cnf
[mysqld]
default-time-zone='+10:00'
And restart the mySql server.
I installed MySQL 8 with native packages on Mojave (10.14.6). As far as I can tell, there is no such thing as a my.cnf file. I couldn't get MySQL to recognize any my.cnf file, even by specifying one on the configuration tab of the MySQL settings applet in System Preferences. The only thing that worked for me was editing /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist and adding <string>--default-time-zone=America/Denver</string> to the Program Arguments section. Either restart your Mac or use the aforementioned applet to restart the server.
I imagine using a city name will only work if you have loaded timezone data into MySQL. mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql worked for me. Otherwise an offset like the above answers should work.
I was installing MySQL installer on my windows 8 machine. During the server configuration process, it gets stuck at "starting server" and doesn't move any further. The log for the same is :
Beginning configuration step: Stopping Server [if necessary]
Ended configuration step: Stopping Server [if necessary]
Beginning configuration step: Writing configuration file
Ended configuration step: Writing configuration file
Beginning configuration step: Updating firewall
Adding firewall rule for MYSQL56 on port 3306.
Successfully added firewall rule.
Ended configuration step: Updating firewall
Beginning configuration step: Adjusting Windows service [if necessary]
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding a new service
New service added
Ended configuration step: Adjusting Windows service [if necessary]
I have already tried the following:-
* Un-installed all the programs that were in any way related to MySQL.
* Deleted the MySQL folder from C:\Program Files.
* Cleared my registry.
and then re-installed the program, but all in vain.
The link MySQL Installer Stuck on "Starting Service" also shows the same problem but the solution provided is not working for me.
Here is what I did:
Installed it with mysql-installer-web-community-5.6.23.0.msi
For my purposes I selected "Custom" install with MySQL servers 5.6.22 - X64 and MySQL Connectors -> Connector ODBC/5.3.4 - 64
Next -> Execute -(ready to configure) -> Next
Config type: Development machine, all defaults (TCP/IP, Port: 3306, Open firewall)
Typed in MySQL Root Password
MySQL user Accounts -> Add user (username, password, OK) -> Next
Configure MySQL Server as a Windows Service (CHECKED)
Windows Service Name: MySQL56 (default)
Start the MySQL Serve at System Startup
THIS IS CRUCIAL (BUG IS HERE): Run Service as...
Standard System Account (CHECKED - but it will be disregarded and that is BUG)
Next -> Execute, Installation hangs on Starting server, so wait for a while to time out (or don't, your choice). When Dialog (might be covered with other windows) popup with message "Configuration of MySQL Server is taking longer than expected..., here click OK (so to wait longer)
Meanwhile go to Start -> Control Panel -> Administrative Tools -> Services -> find MySQL56, right click on it -> Properties -> select Log On Tab AND HERE IS BUG -> Although Local System Account was selected, Somehow "This account: Network Service (with some password) was selected -> Select Log on as: Local System Account, Allow service to interact with desktop -> Apply -> Go back on general tab
On general tab click on "Start" button to start service and here it is! Service is started! Click on OK to close MySQL56 Properties dialog. Close Services dialog. Close Administrative tools. Close control panel.
And by that time (while you were closing those dialogs) when you look at MySQl Installer Dialog all steps are finished and checked: Starting Server, Applying security... Creating user accounts.. Updating Start menu link
Confirm with Finish -> Next -> Finish
That's it, happy MySQL-ing :)
The installer has another issue that I discovered today.
I had the same issue of the installer hanging on "Starting Server". However, after looking at the windows Event Viewer under Windows Logs -> Application, I discovered the error
"Too many arguments (first extra is 'Something').For more information, see Help and Support Center at http://www.mysql.com.".
The issue is that the installer cannot handle spaces in the windows service name (the name I used was Something MySQL). Simply change the name to one without spaces.
My issue was the special character in the password.
What I did to resolve being stuck at the Attempting to Start Server:
1. Use the installer to uninstall the previous version/installation
2. Validate and delete the existing MySQL Folders (DATA and App)
3. Re-install using the installer
4. Use a strong lengthy password with no special character password
This seems to be a chronic issue with MySQL Installer even now (v1.4.17.0). No matter what, every time I (re-)configure an instance on Windows 7 Pro or Server (2008 R2) it hangs at this point.
Simplest fix is:
When the installer hangs, open Windows Services and locate your mySQL service instance(s).
Double-click to open the/an instance and set Log on as: to Local System account and check Allow service to interact with desktop.
Optionally but preferably set the Recovery options to allow the service to resume after a problem.
Ensure that Startup type is set to Automatic (or whatever your preference is).
Click Apply and then click Start (or click OK and then start the service).
Return to the MySQL Installer and close any open warning about waiting for the process to complete and the process should continue.
Repeat as required for each MySQL Server instance.
Note: The installer seems to not enable the firewall exception that you may have selected when MySQL Server was first configured, so you may have to reconfigure again to open the firewall.
Side note: All-in-all, I'd have to say that after only two days of using the MySQL ecosystem, I'm less than impressed by how buggy things are. I would estimate that I had to set up two server interfaces about 6 times before everything worked as advertised. Workbench crashed on me 5+ times in the first day alone and I've had to traipse through any number of forums finding answers to stuff like this. Be prepared to do the same.
I had the same problem where it changed from Local System Account to Network Service, I changed it in the services back to Local System Account. This however did not work. I came across another forum that suggested having spaces in the services name was causing the problem so I took out the spaces and put underscores and sure enough it worked!
Change spaces to underscores!
Adding this for others.
I had install set up to configure windows service.
Looking in Windows Event Viewer => Windows Logs => Application I found:
C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe: Error while setting value '0.0' to 'lower_case_table_names'
Checking the init file in C:\ProgramData\MySQL\MySQL Server 5.6\my.ini
I found:
# Specifies the on how table names are stored in the metadata.
# If set to 0, will throw an error on case-insensitive operative systems
# If set to 1, table names are stored in lowercase on disk and comparisons are not case sensitive.
# If set to 2, table names are stored as given but compared in lowercase.
# This option also applies to database names and table aliases.
lower_case_table_names=0.0
I changed the value to 0, but on reinstall it reappeared as 0.0 so during the install and whilst the installation hanged at 'Starting Server' I edited the my.ini file, saved it, opened the services viewer and manually started the service MySql56. The installation then completed
The MySQL developers insist that running the MySQL service Logged On as NETWORK SERVICE IS the proper way to do it and that running it as LOCAL SYSTEM opens security holes. Okay, people, the root of the problem here is that NETWORK SERVICE can't access the locations where the log files are configured to be. I suspect this error occurs when a folder is specified (by clicking Browse) that the NETWORK SERVICE doesn't have access to. In my case, I specified the log files to be written under My Documents in a folder called MySQL Logs. So, (and this can be done while the installer dialog is open, it says the installer is taking a long time, and prompting you to Wait or Cancel,):
I simply granted full control of that folder to the NETWORK SERVICE by right-clicking on the folder, selecting Properties, selecting Security, then clicking Add, then typing in "NETWORK SERVICE". Then I selected NETWORK SERVICE and clicked the checkboxes Allow for Full control and Modify.
I've figured this one out. Mine was getting stuck at "Starting Server" too and Event Viewer had this -
The description for Event ID 100 from source MySQL cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
innobase_buffer_pool_size can't be over 4GB on 32-bit systems
So I figured out the problem was trying to start the 32-bit version of MySQL that comes bundled in with the installer on a 64-bit machine could have been the problem. Although, MySQL states it will install 64-bit of the database.
What I did was downloaded a 64-bit zipped version and unpackaged it into a temporary location. I re-ran the installer and let it install mysql. I replaced the contents of that with the other version from the temporary location without stopping the installer. Then I continued with configuration steps of the installer. It managed to start the service.
Here's full trace of the log.
Beginning configuration step: Stopping Server [if necessary]
Ended configuration step: Stopping Server [if necessary]
Beginning configuration step: Writing configuration file
Ended configuration step: Writing configuration file
Beginning configuration step: Updating firewall
Adding firewall rule for MySQL56 on port 3306.
Successfully added firewall rule.
Ended configuration step: Updating firewall
Beginning configuration step: Adjusting Windows service [if necessary]
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new service
New service added
Ended configuration step: Adjusting Windows service [if necessary]
Beginning configuration step: Starting Server
Starting MySQL as a service
Ended configuration step: Starting Server
Beginning configuration step: Applying security settings
Attempting to update security settings.
Updated security settings.
Ended configuration step: Applying security settings
Beginning configuration step: Creating user accounts
Attempting to Add New MySQL Users
Added New Users.
Ended configuration step: Creating user accounts
Beginning configuration step: Updating Start Menu Link
Attempting to verify command-line client shortcut.
Verified command-line client shortcut.
Verified command-line client shortcut.
Ended configuration step: Updating Start Menu Link
I found another solution: I was using a complex password with special characters in it. When I switch to using only alphanumeric characters in the password, it installed with no issues.
I faced the same problem. Completely removing MySql from my PC and then installing it from scratch fixed my problem.
How to remove MySql Completely:
Run Command Prompt as Administrator and execute the following command to stop and
remove MySQL service.
Net stop MySQL
Sc delete MySQL
Go to Control Panel >> Programs >> Programs and Features, select MySQL Server 5.x and
click Uninstall. (If you can uninstall MySQL from Control Panel)
Open Windows Explorer and go to Organize > Folder and search options, Select the “View”
tab and under “Hidden files and Folders” choose “Show hidden files and folders”. Now
explore the following locations and delete following folders.
C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL
And if this exists, delete it too:
C:\Users\[User-Name]\AppData\Roaming\MySQL
Restart your PC and reinstall MySQL. That’s all!
I made this problem disappear by upgrading from 5.7 to 8.0.
Specifically I:
Uninstalled MySQL 5.7 (through the "MySQL Notifier").
Downloaded and ran mysql-installer-web-community-8.0.14.0.msi from https://dev.mysql.com/downloads/windows/installer/8.0.html
None of the above solutions worked for me. I finally installed an older version. You can look at the version release history from here. Instead of installing the latest MySQL version 8.0.21.0, I instead installed version 8.0.18.0 from here. It finally worked.
I managed to solve this issue by selecting "Do not secure Data folder" option (a third one in the list) during installation. Explained here: https://dev.mysql.com/doc/mysql-installer/en/server-file-permission-options.html
. Seems like installer could not get access to it
I am getting the following error
ERROR 2013 (HY000): Lost connection to MySQL server at
'reading authorization packet', system error: 0
when trying to connect to my MySQL server.
What I am doing:
I have Master - Slave replication in MySQL that is working and just added load balance capabilities using F5.
I have configured the F5 according to their site.
But when I am trying to connect to my MySQL server using the IP that the F5 was configured with I get
ERROR 2013 (HY000): Lost connection to MySQL server at
'reading authorization packet', system error: 0
Any ideas?
Update on my progress : ZERO
- i am getting the same error
I get no entries in the /var/log/secure as if somebody would try to authenticate coming form the ip where i had created my load balance server.
No enties in the mysql error log.
The command - returns nothing
mysql> SHOW GLOBAL STATUS LIKE 'Aborted_connections';
Empty set (0.00 sec)
I've already altered my my.cnf file and add the
[mysqld]
skip-name-resolve
Alterd the connect_timeout to 10.
So it seems i get no response for the server i have created on my F5
I finally convinced the F5 admin to pass me the log for the F5 server and i have exctraced all i need form it.
Here is the output :
Jan 28 15:46:39 tmm debug tmm[6459]: Rule /Common/iRule-f5_mysql_proxy <CLIENT_ACCEPTED>: BIG-IP MySQL Proxy -- clientside initial connection
Jan 28 15:46:39 tmm debug tmm[6459]: Rule /Common/iRule-f5_mysql_proxy <CLIENT_ACCEPTED>: BIG-IP MySQL Proxy -- clientside responding with server WELCOME packet
Jan 28 15:46:39 tmm debug tmm[6459]: Rule /Common/iRule-f5_mysql_proxy <CLIENT_DATA>: BIG-IP MySQL Proxy -- clientside authenticated flag not set
Jan 28 15:46:39 tmm err tmm[6459]: Rule /Common/iRule-f5_mysql_proxy <CLIENT_DATA>: BIG-IP MySQL Proxy -- mysql client: attempting to do something before authentication
Jan 28 15:46:39 tmm debug tmm[6459]: Rule /Common/iRule-f5_mysql_proxy <LB_SELECTED>: BIG-IP MySQL Proxy -- serverside selected pool /Common/foss-mysql-slave_pool node SLAVE-IP
Jan 28 15:46:39 tmm debug tmm[6459]: Rule /Common/iRule-f5_mysql_proxy <CLIENT_CLOSED>: BIG-IP MySQL Proxy -- clientside connection closed from MASTER-IP(XXXXXXX)
Jan 28 15:46:39 tmm debug tmm[6459]: Rule /Common/iRule-f5_mysql_proxy <SERVER_CLOSED>: BIG-IP MySQL Proxy -- serverside connection closed from node SLAVE-IP(XXXXXXXX)
I've replaced the ip for security sake !
just as an extra - and i think is here the problem - my mysql version is 5.1.69-log
Thx All
From documentation:
More rarely, it can happen when the client is attempting the initial
connection to the server. In this case, if your connect_timeout value
is set to only a few seconds, you may be able to resolve the problem
by increasing it to ten seconds, perhaps more if you have a very long
distance or slow connection. You can determine whether you are
experiencing this more uncommon cause by using SHOW STATUS LIKE
'aborted_connections'. It will increase by one for each initial
connection attempt that the server aborts. You may see “reading
authorization packet” as part of the error message; if so, that also
suggests that this is the solution that you need.
Try increasing connect_timeout in your my.cnf file
Another style:
MySQL: Lost connection to MySQL server at 'reading initial communication packet'
At some point, it was impossible for remote clients to connect to
the MySQL server.
The client (some application on a Windows platform) gave a vague
description like Connection unexpectedly terminated.
When remotely logging in with the MySQL client the following error
appeared:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
On FreeBSD this happens because there was no match found in /etc/hosts.allow. Adding the following line before the line saying ALL:ALL fixes this:
mysqld: ALL: allow
On non-FreeBSD Unix systems, it is worth to check the files /etc/hosts.allow and /etc/hosts.deny. If you are restricting connections, make sure this line is in /etc/hosts.allow:
mysqld: ALL
or check if the host is listed in /etc/hosts.deny.
In Arch Linux, a similar line can be added to /etc/hosts.allow:
mysqld: ALL
This is usually caused by an aborted connect. You can verify this by checking the status:
mysql> SHOW GLOBAL STATUS LIKE 'Aborted_connects';
If this counter keeps increasing as you get the lost connections, that's a sign you're having a problem during connect.
One remedy that seems to work in many cases is to increase the timeout. A suggested value is 10 seconds:
mysql> SET GLOBAL connect_timeout = 10;
Another common cause of connect timeouts is the reverse-DNS lookup that is necessary when authenticating clients. It is recommended to run MySQL with the config variable in my.cnf:
[mysqld]
skip-name-resolve
This means that your GRANT statements need to be based on IP address rather than hostname.
I also found this report from 2012 at the f5.com site (now protected by login, but I got it through Google cache)
It is likely the proxy will not work unless you are running BIG-IP 11.1 and MySQL 5.1, which were the versions I tested against. The MySQL protocol has a habit of changing.
I suggest you contact F5 Support and confirm that you are using a supported combination of versions.
I've struggled a lot with this error. Tried every single answer I found on the internet.
In the end, I've connected my computer to my cell phone's hotspot and everything worked. I turned out that my company's internet was blocking the connection with MySQL.
This is not a complete solution, but maybe someone faces the same problem. It worths to check the connection.
I solved this by stopping mysql several times.
$ mysql.server stop
Shutting down MySQL
.. ERROR! The server quit without updating PID file (/usr/local/var/mysql/xxx.local.pid).
$ mysql.server stop
Shutting down MySQL
.. SUCCESS!
$ mysql.server stop
ERROR! MySQL server PID file could not be found! (note: this is good)
$ mysql.server start
All good from here. I suspect mysql had been started more than once.
My case was that the server didn't accept the connection from this IP. The server is a SQL server from Google Apps Engine, and you have to configure allowed remote hosts that can connect to the server.
Adding the (new) host to the GAE admin page solved the issue.
I have a mac but would assume all linux are the same for this part...
In my case I got this:
2018-12-03 11:13:27 - Start server:
2018-12-03 11:13:27 - Server start done.
2018-12-03 11:13:27 - Checking server status...
2018-12-03 11:13:27 - Trying to connect to MySQL...
2018-12-03 11:13:27 - Lost connection to MySQL server at 'reading authorization packet', system error: 0 (2013)
2018-12-03 11:13:27 - Assuming server is not running
I ran this:
sudo killall mysqld
And then started the mysql again through mysqlworkbench although in your case it might be like this:
mysql.server start
*sidenote: I tried running mysql.server stop and got this Shutting down MySQL
.... SUCCESS! but after running ps aux | grep mysql I saw that it hasn't really shut down...
I use several mysql connections (connecting to different sets of databases) in localhost.
This happened to me after I shut my computer down and mysql was not properly shutdown. After starting my machine I was able to successfully connect to multiple db connections except one (I used this a lot before my machine shutdown).
As per the instructions in this posts I doubled connect_timeout but I was not able to connect to that one database connection.
I restarted my machine and i can successfully connect now. This will help you unblock yourself but it'd be great if it can be fixed without restarting the machine.
Another concern is: connection_timeout seemed to me delay related problem but I was getting the error immediately in localhost when there is no network in the equation.
In my case, it happened when there were a lot of connection to the MySQL server (15,000 connections) and the free memory was about 120M . After I added more memory to the server, the error was gone.
I scratched my head about this error for 3 days. I tried tweaking permissions on the database, new users from different IPs in the Users table, adjusting the bind-address in a bunch of different ways, comparing my my.cnf file to a known working server, firewall changes, upstream firewall changes, hosts.allow/deny...none of them worked.
Then I looked not at mysql/error.log (which came up empty) but my journalctl -xe log and low and behold, it couldn't read my /etc/hosts.allow and my /etc/hosts.deny file.
chmod 644 hosts.allow
chmod 644 hosts.deny.
All better now.
Another possibility can be connection reset from the TCP wrappers (/etc/hosts.deny and /etc/hosts.allow). Just check what is coming in from the telnet to port 3306 - if it is nothing, then there is something is in the middle preventing communication from happening.
I've created my account just to add this bit of information to this old question, because nowhere on the web I found any reference to the cause of my problem which I eventually found.
(Adding it here cause this is the top google result, also when adding PHP as search term)
In PHP 7.4 when you fork a process (I know, who does this??) that has an active MySQL connection, the connection will get messed up and spit out the OP's error.
just reinitialize/recreate the connection in each forked process after the forking, this will fix it.
Hope it this helps anybody.
I got both errors: mostly reading initial communication packet and reading authorization packet one time. It seems random, but sometimes I was able to establish a connection after reboots, but after some time the error creeped back.
Avoiding the 5GHz WiFi in the client seems to have fixed the issue. That's what worked for me (server was always connected to 2.4GHz).
I tried everything from server versions, odbc connector versions, firewall settings, installing some windows update (and then uninstalling them), some of the answers posted here, etc... lost my entire sleep time for today. Super tired day awaits me.
If you get this when using DevDesktop - just restart DevDesktop!
My MySQL Workbench is not connecting to my local host, and I cannot figure out why exactly it is reacting like this. It just started doing this one day, and randomly it will give me access although it says it is still "unknown", but I am tired of this and would like to fix it.
Since this website reqires that I have a "10" reputation to post images, I will have to describe it.
On the Startup/Shutdown tab in the administration page, it says:
The database server instance is unknown. --The "Start Server" button is faded out so that I cannot click it.
Startup Message Log
2013-07-11 08:57:51 - Workbench will use cmd shell commands to start/stop this instance
2013-07-11 08:57:51 - Status check of service 'MySQL' returned error: Not found
2013-07-11 08:57:51 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:00:55 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:00:55 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:02:01 - Status check of service 'MySQL' returned error: Not found
Then on the server status tab in the administration page, it says:
Name: mysqld#localhost
host: localhost
server:unknown
status: unknown
Connection
There is no connection to the MySQL server. This functionality requires an established connection to a running MySQL server to work.
If anyone can help out, that would be great!
Thanks
I had this problem on my Windows 8.1 machine and it turned out to be problems with the file permissions.
To repair it I went into the folder at "C:\Program Files\MySQL\MySQL Server 5.6" and right clicked on the "data" folder and selected properties. Clicked the security tab and clicked edit. From there click the ADD button then the ADVANCED button and finally the FIND NOW button. In mine I added users, administrators, and "ALL APPLICATION PACKAGES". I granted full control to the users that were already listed for the data folder and the users, administrators, and ALL APPLICATION PACKAGES.
After the permissions were repaired I opened a command prompt as administrator and changed to the "C:\Program Files\MySQL\MySQL Server 5.6\bin" directory cd "C:\Program Files\MySQL\MySQL Server 5.6\bin". From there you can execute mysqld --install which installs the MySQL service.
More information about installing the mysql service on windows can be found at http://dev.mysql.com/doc/refman/5.0/en/windows-start-service.html
[edit] Please note that if you are using a different version of MySQL than the path to the MySQL data directory and bin directory may be different on your windows machine.
The error message says it: the service with the name MySQL cannot be found. So probably your MySQL service has a different name? Do you have a service at all? Starting mysql manually from the bin folder is just that: manual. There is no service involved, hence WB cannot manipulate the run state.
When you install MySQL with the MySQL installer you have everything in place within a couple minutes and it works right from the start.
So first check if you have a service running for your MySQL server and stop starting it manually. If there's a service take its name and enter it in the Windows Service Name field of the configuration manager:
Note that MySQL Workbench can manage your server only if it is installed as a Windows service.
I had this problem on my Windows 8.1, and I solved it updating my workbench to Version6 with "mysql-installer-web-community-5.6.16.0.msi" from the official page of mysql
I have found reinstalling all MySQL products a better alternative, because some of the solutions on the internet will make another instance of your mysql server along with mysql56, which might mess things up for a beginner.
Remember to keep database files and configuration undeleted during the reinstallation.
I had problem on MAC.
Please ensure you have installed mysql and its running. Because installing only workbench app, will not install mysql service. First install mysql and run the service.
In my case, I tried with brew
brew install mysql // installing mysql
brew services restart mysql // restart service after installing
mysql --version // check version
I am developing a C program that accesses mysql. I have the following line in my code:
sts = connect_to_server(&mysql, "localhost", "my_username",
"my_password, "my_databasename");
with the actual values replaced, of course. I get:
Failed to connect to MySQL: Error: Can't connect to local MySQL server
through socket '/tmp/mysql.sock' (2)
I have seen other questions like this, and the answer is usually that the server is down. In this case it is not. PHPMyAdmin can access the server just fine.
And many of the other responses said to check for the socket file. It is present
(/Applications/AMPPS/mysql/tmp/mysql.sock).
Could this be something to do with paths or something? It isn't adding the path to "/temp/mysql.sock" and therefore can't find it?
I know very little about unix. I have been running OSX for nearly 10 years, but I almost never go down to that level.
Take a look into the mysql configuration file (typical my.cnt somehwhere under /etc) and adjust the value for socket to fit your needs.
Alternativly you could just link /tmp/mysql.sock to /Applications/AMPPS/mysql/tmp/mysql.sock:
ln -s /Applications/AMPPS/mysql/tmp/mysql.sock /tmp/mysql.sock
I think wrong my.ini is getting loaded. By default it looks at /etc/my.ini so if it is present just rename or delete it. Restart your MySQL Server.