WAMP installation error: MySQL port - mysql

I am running Windows 7 Home Premium (yuck). I have MySQL already installed. The port I am using for various MySQL projects is 3306. I have used MySQL Workbench to create a database for a planned Drupal site. When I login as administrator and try to install WAMP, the installation program asks me to specify the port for MySQL. I enter 3306 and receive the error: "It seems you do not have enough permissions to bind to the port or the port is already taken by another application. Please select another one." When I try a different port and complete the installation, there are no servers listed for me to start. Is it possible to convince WAMP to allow me to use 3306, which is my preference? Thanks.

Switch of all other running programs, for example - skype. And restart your wamp server

Related

Problem with mysql workbench and xampp server

I am trying to create a project with mysql. For the past two days I had been using XAMPP server for the mysql server and mysql workbench to use it and it has been working perfectly. Today after having to restart my pc for a windows update, when I turned on the XAMPP mysql server and tried going to my connection in mysql workbench, mysql workbench is giving me an error
Could not connect; Server may not be running Message: Lost connection to mysql server at 'waiting for initial communication packet'. system error 10060
I have tried multiple solutions; Changing the port of the mysql server. Using a different username and password, the root username. And have tried restarting my computer multiple times to fix the problem. If any more information is needed to find the problem I will update this question to provide more information.
UPDATE 1:
I left my laptop running and when I returned the workbench had connected successfully. I believe the problem comes from restarting the pc as the day after I posted this question I restarted my pc to fix a problem and I am currently having the same situation.
Maybe the problem is the Windows Firewall or the Antivirus.
If the server is running all the time and the service not stop, the port is blocked.
Check if the default port is Listening:
C:\Windows\System32>netstat -an |find "3306"
Or you can use the Microsoft Tool PortQry.exe download from:
https://www.microsoft.com/en-us/download/details.aspx?id=17148
Example of use:
C:\PortQryV2>PortQry.exe -n 127.0.0.1 -e 3306
Querying target system called:
127.0.0.1
Attempting to resolve IP address to a name...
IP address resolved to WF-SA02
querying...
TCP port 3306 (unknown service): LISTENING
C:\PortQryV2>
Might be an SSL problem. The problem is: XAMPP does not use SSL and MySQL Workbench uses SSL as a default setting.
You can select "If available" in the Use SSL dropdown box of the SSL tab of the connection pane. Use the tool icon in the startup window to edit already existing connections. Works in MySQL Workbench 8.0.28+

Using XAMPP and Mysql Workbench together

There are some related posts to this but I still can't figure this out. I have a working install of XAMPP(latest version) and MySQL Workbench 8.0.17 installed. I just want to be able to use Workbench with the MySQL that ships with the XAMPP install.
In the latest version of XAMPP, it first sets an IP address before I can start apache and mysql. MySQL seems to be running on port 3307.
Here is the Workbench screen to make a new connection. XAMPP is running on localhost - should that be my hostname?
If I try a localhost or 127.0.0.1 hostname with port 3307 (where I think XAMPP's MySQL is) I get this popup alert. If I continue, I still don't see any of my databases listed on the main screen.
This is the way I have used to connecting MySQL workbench to Xampp MySQL.
01) Click on the Plus icon.
02) Check the Xampp MySQL port number.
03)Type the connection name and check the port number with your Xampp MySql port number.
04) Click on the "Continue Anyway" button.
05) Then click on the "OK" button to save the connection.
06) Now you can see the connection you just created and click on it to connect to the MySQL database.
07) Just try to run some SQL code to if properly connected to Xampp Mysql.
I finally find solution on mac:
Notice that XAMPP server works on virtue machine inside with debian system and MoriaDB, so if you'd like to run Mysql WorkBench on MacOS outside, you must not use 127.0.0.1 or localhost as host name.
Please check your ip address of XAMPP on its panel General tab, mainly like 192.xxx.xxx.x, this is your host name!
And if you disable or uninstall mysql in your system, you can safely use default port 3306, or if you must use both XAMPP and local version, modify one pls.
Then, when it comes to user part, do not use root! Please add a new user in phpMyAdmin with hostname %, or open XAMPP terminal and use mysql instructions.
After filling all those above, Mysql will be able to start (although with warning, you can ignore it).
The way I 'fixed' this issue was to install an older version of xampp (5.4x) which ships with mysql, not mariadb. Before the install, I dumped all my dbs into a file and then imported them again after the install. Through XAMPP/phpMyAdmin I could see the fresh database. I tried to connect with MySQL Workbench and walla!
If you are on Ubuntu, run this command on terminal
sudo /opt/lampp/bin/mysql_upgrade
and then follow #prasadgayan 's answer above.
Note: It is a slight chance that your mysql_upgrade be in some other directory. If that's the case, run it from that path.
Please comment, if something similar work for Windows as well.
Namaste🙏
Reference: Tables could not be fetched - Error loading schema content
Normally the issue is that one is trying to use root as a user, which is somewhat prohibited. So just create a new user with the correct access privileges granted. Here's a solution, that worked on a Mac (but should be relevant to most OS's).
Start the XAMPP stack. For simplicity, open phpMyAdmin, by default accessible via 127.0.0.1:80/phpmyadmin/ or 127.0.0.1:80/phpmyadmin/ locally.
In case needed, log in with the username root and an empty password field.
Create or pick a database for the user, to grant access to, for example "test_db". Enter the following in any SQL prompt (which normally can be executed by pressing [ctrl] + [enter]):
create user userbob identified by 'Pass2bob!';
grant all privileges on test_db.* to userbob#localhost;
Note your Xampp IP-adress which tends to default to "192.168.64.2" and port 3306. Now you should be able to access that database.
I tested the connection with some PHP-code, which I included here and might come handy for someone. 3306 is default as MySQL/Maria the database port, but I left it here in case someone, sometime, have to use a different port.
<?php
$con = mysqli_connect("192.168.64.2","userbob","Pass2bob!","test_db", 3306);
if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }
?>

MySQL Server 5.7 and WAMPServer in the same machine wamp can't run

I have installed mysqlserver 5.7 and after that I can not run wampserver it's orange icon never turn to green. any body please help.
WAMPServer also has a MySQL Server installed as part of it.
By default MySQL Server talks with the outside world using a TCP port (3306) and only one app can be using a TCP port at any one time.
So basically you have 2 people both trying to use the same phone line, which is not possible.
If you have WAMPServer installed you have no need to install another MySQL Server instance, so I suggest you uninstall the independant MySQ Server that you have installed. It is quite possible for one MySQL Server to run 100's of seperate databases, so if you thought you needed ONE MYSQL PER DATABASE that is not the case.
You can edit the configurations and make them run on different ports. For me I installed MySQL server 5.7 first and after I tried to install wamp, but it couldn't run. Go to C:\wamp\bin\mysql\mysql5.6.17 and edit the following lines in the file my.ini
[client]
#password= your_password
port= 3308
[wampmysqld]
port= 3308
[mysqld]
port=3308
I also edited the file:mysql_config.pl in C:\wamp\bin\mysql\mysql5.6.17\bin
$port = '3308';
save changes and restart WAMP, it should launch normally.

problems connecting to port 3306 mysql workbench with XAMPP

I'm trying to learn the apache / mysql / php stack bundled with XAMPP. I can't connect to the MySQL server using the MySQL workbench:
Your connection attempt failed for user 'root' from your host to server at localhost:3306: Can't connect to MySQL server on '127.0.0.1' (61)
Thinking it's a port problem, I check the port directly in Terminal with the command telnet 3306:
telnet: connect to address 127.0.0.1: Connection refused
Obviously the problem isn't with the Workbench, but something to do with the port connection itself.
I'm using:
OS 10.8 Mountain Lion
XAMPP 1.7.3
MySQL workbench 5.2.47
Sorry all, I'm posting my own question and answer. I had this problem and it nearly destroyed me because I could not find the correct answer anywhere on the interwebz. I finally overcame it, and wanted to post my findings in case it helps another befuddled traveler.
It turns out when you install XAMPP and choose to run the security routines, it automatically turns on a setting in the MySQL preferences to block connections on port 3306 from localhost. To fix this, open my.cnf in the xampp folder xamppfiles/etc. Look for the setting "skip-networking" which tells mySQL to block the port 3306. Comment this out by adding a pound sign so it is "#skip-networking". Now, the telnet command should work, and you should be able to use the Workbench.
Hope this is helpful for somebody!If it fixes your problem, give me a shout at #mrcheeks3185.
I faced same problem but I solved it.
I changed the MySQL workbench port to 3307 in the file below
C:\ProgramData\MySQL\MySQL Server 5.7\my.ini
and keep the default port 3306 for XAMPP
for mac you should create only a user with password and grant access(in my case a I use root with password) and turn on ip address and use that address to connect with a client like navcat or workbench I use XAMPP 7.3
ip address network given by XAMPP
connection config in navcat
test connection
I found that file after mount the image disk created for xampp, there you can find new_disc_mounted/etc/my.cnf
If you do not have my.cnf you can first go to xampp->mysql->bin->my.ini, copy
the contents of the file, next create my.cnf (in the bin folder) and paste the content to the file you just created.
This works for me. I had the same problem. Now I can use both Xampp and Workbench on one PC.
There is an issue: when you start workbench you get some warning that some features may not work properly since database is not fully compatible.
If changing ports won't work. What I did, I just make sure both XAMPP and MySQL Workbench don't start the server at the same time. Just go to MySQL Workbench, Select Server > Startup/Shutdown > Shutdown.
its due to different version of xampp, open log file and check last status of mysql there is showing error find it or remark/change it
Actually XAMPP and MySQL workBench might be using same port an are conflicting "3306" in so you are getting that error
Please try changing the workBench's default port number to other number and try again

Getting Path to MySQL on Apache running on Windows

I've set up an Apache 2.2 and PHP 5.3 server on my Windows 7 machine. However, phpinfo() tells me that I have MySQL installed as well, but I had no clue I do. I'm having trouble finding the installation, so how can I find the path to MySQL? I know how to do so with Linux (whereis MYSQL), but what do I do with Windows?
If you didn't setup MySQL explicitly, and you didn't install a complete WAMP installation, you don't have MySQL. PHP just checks if the MySQL library is installed. If you try to connect, it will probably fail.
I would check under C:\Program Files\MySql or under c:\MySql
Also, MySql typically is configured to run on port 3306; so I would
check whether you have this port open on your local computer. How?
Just telnet to port 3306 on localhost and see if you can connect. If
you can, most likely MySQL is running on your PC and you should be
able to connect to it.
Read the MySQL Documentation regarding this topic.