I do my best for explain my problem !
I'm on linux Ubuntu and i use xampp, if i start xampp = Apache Web : running, ProFTPD : running, Mysql: Stopped.
The code error for my sql is :
2020-02-28 15:19:42 0 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use 2020-02-28 15:19:42 0 [ERROR] Do you already have another mysqld server running on port: 3306 ? 2020-02-28 15:19:42 0 [ERROR] Aborting
If i go http://localhost/phpmyadmin/ with 'root' and 'root' is work and i can see my database on the left.
If i watch my netstat :
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1111/mysqld
So i try to stop server with "sudo service mysql stop", now on xampp i restart all and = xampp Apache Web : running, ProFTPD : running, Mysql: running.
Now, go to localhost phpmyadmin but "root" "root" not working and "root" "" work fine but i watch on left and all DB gone.
If i restart my pc and launch xampp = mysql:Stopped and "root" "root" works and on left i can see my db.
I don't understand the problem if someone explain me why mysql running on start and on xampp is stopped ?
Why if start, all db gone and the password is not the same ?
(Sorry i don't have a good english)
EDIT :
Thanks i think is a good way !
But i have a lot of problem all time. I export my Db i got a " mydatabase.sql"
So now i go on xampp mysql and i'm connect but i see this message (pop-up)
But i'm on adminphp so i go on import and is say me that
I have develop a website on php but now i follow udemy course for laravel and mysql cause me a lot of trouble i do nothing all this day :(
You have two instances / version of MySQL running, looks like you have solved that one,
So you now backing up and moving across your databases.
From your screen shots your getting a few errors, but I can see you you importing your .sql files directly on the server root.
If you your .sql file does not contain a using statement phpmyadmin will not know which database to put the data into. Add the following line to it or move into the database and retry the import.
USE databasename;
Or if the databases do not exist you can use the following
CREATE DATABASE databasename;
USE databasename;
substituting databasename for the name of your database.
I am getting following error when I test mysql port 3306:
***** Test which uses port 3306 *****
===== Tested by command netstat filtered on port 3306 =====
Port 3306 is not found associated with TCP protocol
Port 3306 is not found associated with TCP protocol
--- Do you want to copy the results into Clipboard?
--- Type 'y' to confirm - Press ENTER to continue...
I've tried many methods but it could not work. Apache is working fine but MySQL service is not able to start. Wamp icon is orange and showing only 1 of 3 services running.
I have tried all points mentioned in MySQL service not starting on WAMP?
After so much exploring, it is rectified now. The my.ini file inside the Windows folder was the real problem. It is conflicting with the WAMP mysql my.ini. Now it is working fine after deleting that file from the Windows folder.
after lots of struggling, I found the solution in this answer
for me, the reason for this issue was the wrong config data was cached for mysql so did this:
I tried going to: C:\wamp64\bin\mysql\mysql5.7.24\data and deleted the
following:
auto.cnf, xxxxxxxxx.err, xxxxxxxxx.pid, ib_logfile0 and ib_logfile1
But I left the ibdata1 alone as it references all local databases.(dont delete that at all!) I
then restarted wamp and it worked like a charm.
Delete the my.ini file inside the folder work
Go to cmd and run 'netstat /a' to get a list of all the ports running.
Check to see if TCP 0.0.0.0:3006 is on the list. On mine, it was not and 0.0.0.0:3008 was on the list instead.
To verify the database is in fact running:
Change directory to the folder holding the mysql version I expected to be running. Then I attempted to login with command line to the mysql database I instantiated with phpMyAdmin... using 'mysql -u yourloginId -p yourDataBaseName'
Hit enter and then enter your pass word. If you did not setup a password... skip the '-p'.
If you database is running you'll get a bunch of info related to it and changes the prompt to 'mysql'.... type in 'quit' and hit enter to exit out. Then you are done with cmd.
Since the database is running and WAMP is using ports in the 3000 range, then I assumed that 3008 is the correct port. Go to the WAMP icon click on it... go to php then php.ini and edit it. Do a find on 3006... and you will likely find it as mysql port... change it to the port actually running mysql... for me it was 3008. Save it and restart WAMP... Issue should be resolved.
going to C:\wamp64\bin\mysql*yourmysqlversion* you should find my.ini
After deleting that file you should be fine. Be sure to use your Wamp testing tools in wamp settings to test the ports for Mysql/Maria DB and Apache. Microsoft IIS is a common culprit for not making all services run.
All of a sudden I am encountering this problem on my mac. I cant start my MySQL Database. I can only start my ProFTPD and Apache Web Server.
This is the application log:
Starting all servers...
Starting MySQL Database...
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting ProFTPD...
Checking syntax of configuration file
/Applications/XAMPP/xamppfiles/proftpd/scripts/ctl.sh : proftpd started
I have even did some research through stackoverflow. First i tried to end the process through my activity monitor by i couldnt find the keyword sql on the filter search area. The second method i tried was adding the unset DYLD_LIBRARY_PATH
but that didnt even worked for me.
Can i know how to solve this problem. Helps would be really appreciated. Thank you
#1. Open XAMPP Installation Directory
#2. Open "etc" Folder
#3. Find "my.cnf" file and open it in any text editor
#4. Change Port from 3306 to 3307 (if you have installed skype or other apps)
#5. Add "innodb_force_recovery=1" under "myisam_sort_buffer_size=8M"
#6. Save "my.cnf" file
#7. Restart Mysql Server By Your Terminal by command:
"sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start"
You Get A message "Starting MySQL SUCCESS! "
For me, Xampp Control panel was not launching, and in Stackoverflow some where it was mentioned to add Read / Write for every one on every file of xampp, when I did that. It allowed me to launch xampp control panel but mysql was not starting.
Later I debuged and found that /Applications/XAMPP/xamppfiles/etc/my.cnf should not be writeable by everyone, mysql will ignore my.cnf if it is for everyone. I changed the permission to read only for this file, and able to start mysql server
I just solve the answer by going to the activity monitor and search for sql under all process and terminate it. then i restart my mac and now my sql database is working great for me.
I Know this post was originally posted last year, but I just had the same problem and I found the solution for me. So here it is, just in case this can help somebody else.
I tried all the suggestions I found online, including trying to terminate MySQL on the activity monitor, but then I realized that when you download/upgrade XAMPP - MySQL, the option to automatically start MySQLserver on Startup is ON. You need to turn it off. Here is what you do:
Go System Preferences and click on the Mysql icon, You should get this window:
Uncheck that option. You will be asked for your password. After you are done with that, restart your computer and the problem should be fixed.
I hope that help somebody who is as confused as I was. lol ✌🏼
Xampp Control Panel> Manage Server> Mysql Database > Configure > change the port from 3306 to 3307
At least it worked for me in mac.
For me using macOS Catalina, I had to delete this 2 files then quit and restart the manager-osx:
MyName-MacBook-Pro.local.err
tc.log
The folder path is this: /Applications/XAMPP/xamppfiles/var
Note: the 2 files were automatically regenerated after I start and Apache and MySQL
If mysql is not starting in xampp, it might be a port conflict issue. Mysql run by default on port 3306. you need to check if another application is occupying that port. use following command to check app occupying a port
lsof -nP -i4TCP:3306
if you find an application occupying that port, stop the application and restart xampp. As an alternative, you can go to php.ini file or click configure in the dropdown and change the mysql port to 3307
I spent whole day trying to resolve this issue. Changing the port no from 3306 to 3307 worked for me. Simply open the configure module and change the port number. Hope it works for you.
In case this may help. I followed all the steps above still nothing worked for me. And I follow this article MySQL database won't start in xampp and it worked. what is says is:
Steps
Open terminal and type
sudo su
and then put in your password
Then type
ps aux | grep mysql
You will need to get the process id of mysql. There should be number near the top, something like 739 or 8827 (in my case I got 74689, just look after mysql or _mysql process id)
Kill the process using
kill -9 {process id}
this should look something like this: kill -9 739
Restart MySQL in manager-osx
If any of the above don’t work, This should work:
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
I tried the suggested solutions above however none worked for me. So I uninstalled XAMPP and then reinstalled it and so now MySQL server starts up ok.
When I try to export my database through MySQL Workbench remotely from localserver,
I am getting some below version error:
mysqldump Version Mismatch [Content] mysqldump.exe is version 5.5.16, but the MySQL Server to be dumped has version 5.6.10-log. Because the version of mysqldump is older than the server, some features may not be backed up properly. It is recommended you upgrade your local MySQL client programs, including mysqldump to a version equal to or newer than that of the target server. The path to the dump tool must then be set in Preferences -> Administrator -> Path to mysqldump Tool
I am trying to find a solution - I searched for solution on google but couldn't find a good answer to solve the issue.
Does anyone know, how to fix this issue in MySQL Workbench?
Go to: Edit -> Preferences -> Administrator -> Path to Mysqldumptool:
Look for file mysqldump.exe in your MySQL Server installation folder (it could be: mysql/bin/).
Then click it, and OK. After that try to do the backup.
Fortunately, although not obvious, there is a fairly straightforward solution. You just need to update the mysqldump.exe. The up to date version of the .exe file can be found in. To solve the issue just go to Edit->Preferences->Administrator, and browse the following path
C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe
grab this file and replace it at the Path to mysqldump tool textbox
There may be the following path is set before the above mentioned before, so just replace it with the newer one
C:\Program Files\MySQL\MySQL Workbench CE 5.2.47\mysqldump.exe
The paths may be slightly different for you, but the solution remains the same.
In some OS(64bit), there are two folders
C:\Program Files (x86)\MySQL
and
C:\Program Files\MySQL
But you have to go for C:\Program Files\MySQL
Hope it will help :)
In Linux-based like Ubuntu, Edit > Preferences... > Administration (tab), set "Path to mydqldump Tool" to /usr/bin/mysqldump (most likely by default that's where it suppose to be).
If you're not sure, you can try to find where is the mysqldump located by running the following command in terminal:
locate mysqldump
The message says you need a newer mysqldump tool. One that matches the server you want to dump from. So depending on the platform you are running get a copy of the mysqldump tool from a server installation that has a recent version. Each server comes with a mysqldump tool. So it should be easy to get a copy.
Put the tool in a location where it has a persistent home, but does not conflict with other instances, and point MySQL Workbench at it (as the message says).
This occurs when the version of your mysql workbench is different than that of your mysql server. Solution to this is to use mysqldump.exe having version same as that of your server for taking the export/dump.
Steps :
Download the mysql zip of the same version as your server. (eg. mysql-5.7.25-winx64.zip)
Inside this zip you will find mysqldump.exe under bin folder.
Open the Mysql workbench. Go to Edit -> Preferences -> Administration.
Now, in Path to mysqldump Tool :, give the path of this downloaded mysqldump.exe
I was trying to solve this issue with the default mysqldump using Edit > Preferences... > Administration (tab), and setting from /usr/bin/mysqldump which did not work.
I saw that XAMPP server has a mysqldump file too which worked fine! Generally, you can find it in /opt/lampp/bin/mysqldump (for Debian and similar) so you can use this path in your preferences inside workbench.
I did take an archive for mysql version of need from here https://downloads.mysql.com/archives/community/
And used from there mysqldump. It helped for me.
On my Mac, (running latest Mac OS Sierra), I changed the path of mysqldump to /Applications/XAMPP/xamppfiles/bin/mysqldump, and that solved the problem. Previously, the path was set to a different version (older version) of mysqldump. So, you need to get the newest version of mysqldump.
The solution that worked for me is the following:
enter the page https://www.pconlife.com/viewfileinfo/mysqldump-exe/
there is a list of mysqldump.exe files, they must download the version that matches the one that appears in the error.
then go to the folder where mysql is installed usually
C: \ Program Files \ MySQL \ MySQL Workbench 8.0 CE
There they put the downloaded file, and they give it replace.
now open MySQL they will change the path that appears in:
Preferences> Administration> Path to mysqldump tool:
by the address where the replaced file was
that's all
As these answers are not totally clear for Mac users this is where I found my MySQLDump file:
Applications > MAMP > Library > bin > mysqldump
A quick search of 'mysqldump' should locate this.
I followed the above answers and go to:
Preferences > Administation > Path to mysqldump Tool:
This was my path in there now: /Applications/MAMP/Library/bin/mysqldump
wb_admin_export.py (used by mysqldump) looks at PATH variable to find mysqldump and get version number. make sure its mysqldump from mysql bundle, not mysql workbench...
Mac user here: I had this problem after updating MySQLWorkbench. Tried everything.... at last, I downloaded the old version back and downgraded MySQLWorkbench. Worked flawlessly.
For Mac users, it works only after restarting Mysql Workbench, after setting Path to Mysqldumptool in settings (Edit - Preferences - Administrator ).
None of the other answers here has worked for me, so I'll post another way that has fixed mine(I'm using Windows WSL Ubuntu 18.04).
TL;DR: check if you have the line local_infile=1 in the configuration file of your MySQL and change it to loose-local-infile=1 or comment it out altogether if you don't need it now and then restart your MySQL Workbench.
Further Explanation: I closed MySQL Workbench and opened up my terminal and ran mysqldump --version and it gave me this error: mysqldump: [ERROR] unknown variable 'local_infile=1'., I realized that I'd added something to the /etc/my.cnf file previously in order to import some data into a database using a local file, but as it turns out, some other MySQL tools (such as mysqldump, probably) do not understand this line well, so I commented it out and then mysqldump --version works fine and gives the correct version number without any other issues. Now I open the MySQL Workbench once again and this time it's working fine.
HTH.
If none of the above solutions worked the version of mysqldump can be hardcoded in wb_admin_export.py
def get_mysqldump_version():
#path = get_path_to_mysqldump()
#if not path:
# log_error("mysqldump command was not found, please install it or configure it in Edit -> Preferences -> Administration")
# return None
#
#output = StringIO.StringIO()
#rc = local_run_cmd('"%s" --version' % path, output_handler=output.write)
#output = output.getvalue()
#
#if rc or not output:
# log_error("Error retrieving version from %s:\n%s (exit %s)"%(path, output, rc))
# return None
#
#regexp = ".*Ver ([\d.a-z]+).*"
#if ("Distrib" in output):
# regexp = ".*Distrib ([\d.a-z]+).*"
#
#s = re.match(regexp, output)
#
#if not s:
# log_error("Could not parse version number from %s:\n%s"%(path, output))
# return None
#
#version_group = s.groups()[0]
#major, minor, revision = [int(i) for i in version_group.split(".")[:3]]
#return Version(major, minor, revision)
return Version(5, 7, 30)
Only this worked for me: Workbench on windows and Mysql server on a remote linux.
I had to make a local copy of my remote database and was facing MySQLWorkbench´s version problems. In order to avoid reinstall MySQLWorkbench to adapt to the remote database version, I did next:
I exported my database from the remote server into /home/my-user/ folder (on remote server) using ssh:
root#bananapi# mysqldump -u root -p my-incredible-password > /home/my-user/database-dump-18-set-2020.sql
Having the sql script in /home/my-user/ remote directory I download it in my local folder using scp command:
my-user % scp root#remote-server-ip-address:/home/my-user/database-dump-18-set-2020.sql /Users/my-mac-user/tmp/
The I just had to open the sql script file using my MySQLWorkbench and import the data in my local database. I hope this can help somebody.
A possible solution is to create a script that runs mysqldump with the flag --column-statistics=0, then configure Workbench to point to the script:
#ECHO OFF
"C:\Program Files\MySQL\MySQL Workbench 8.0 CE\mysqldump.exe" %* --column-statistics=0
For WordPress data dumps (in my case it uses MySQL v 5.7.39) I downloaded the respective version of Workbench (v6.3.10) and installed it in a different directory. Then configured MySQL workbench v 8.0.28 to point the paths to the mysqldump tool and MySQL tool to Workbench v6.3.10 app internal paths by copying/pasting the routes.
Then exporting was successful.
Problems:- Whenever I try to select all tables in a database the connection is just lost and unknown error is given by the server to the browser and the browser just reloads with its own error page stating that the server gave unknown error. (This is in phpmyadmin)
I tried to solve this by adding max_allowed_packet to my.cnf first time and restarting mysql , and then adding it by mysql --max_allowed_packet=32M and restarting mysql, but the changes were not reflected in mysql. The limit was still set to default which is 16M.
Can anyone please suggest possible solutions for this
First I'll assume you are using apache
log in to your server
run the command
tail -f /var/log/httpd/error_log <== may be different depending on your install
then run the same query in phpmyadmin
watch the output of the tail command and see what it says.
restart server and try again by using command reboot