apache mysql - "packets out of order" on 3306
Asked Answered
M

5

36

I just did a fresh install of Apache server 2.2. Everything works. When I go to localhost I get: "It Works!"

I just installed mySQL5.5 and when I go to localhost:3306 I just get gibberish:

J��� 5.5.22�'���4[LM{D~p�ÿ÷!�€����������6[I=4/+,9z{|�mysql_native_password�!��ÿ„#08S01Got packets out of order

I see many posts on the internet with users with similar problems, but I can't figure out a solution.

Can anyone help?

Methuselah answered 7/4, 2012 at 10:20 Comment(0)
T
35

The mysql service is not a web interface - you cannot connect using a browser. You will need to install a mysql client of some kind.

Tessie answered 7/4, 2012 at 10:28 Comment(3)
I ran an sql script that created a db. I created a php page that spits out the data in the db, but I get the garbled text above when I try to load the page: localhost:3306/test.phpMethuselah
You need to be loading the page using localhost/test.php. That is the apache server. It is the apache server that is delivering test.php, not the database. 3306 is the port that the database listens on for database connections, such as from your code.Tessie
In my case, I was connecting to the wrong port while running a docker-compose based project,Rosecan
M
4

If you try to start phpmyadmin then do it like this:

localhost/phpmyadmin
Margalit answered 14/3, 2017 at 9:57 Comment(0)
E
1

I'm a jsp beginner. I have a same problem with you. I guess it's kind of port problem.

For me, I had set the port for Apache server connector as 9090. Later, when I installed mysql, the port for mysql was 3306 as its default port.

In my jsp file, i loaded jdbc driver like 'jdbc:mysql://localhost:9090/dbname' and then i call 'http://localhost:9090/my.jsp' on my web browser. That's when I got the same problem with you.

I fixed the port part in my jsp file like 'jdbc:mysql://localhost:3306/dbname' and I could get it all right.

I think you need to check the port for your Apache server. You can check out \conf\server.xml file in your Apache directory. The part starts with "Connector port=8080...." in server.xml file. If so, you need to put 'http://localhost:8080... on your browser.

Eyla answered 12/11, 2012 at 13:37 Comment(0)
M
0

Try just to write http://localhost/ without the port and it will work , Or go to your phpmyadmin and click on My websites and it will take you immediately to your localhost

March answered 27/7, 2018 at 9:22 Comment(1)
it doesn't. still downloading random filesNeolithic
H
-1

I'm having exactly the same problem, so far I have : 1)Manually changed the Collation (it seemed to be defaulting to cp850)

2)altered the ini/cnf file (located under services.msc -> MySQL)

3)Changed the max_packet_size to 2G

3)rebooted the server.

As a start to this please run this script from MySQL 'SHOW VARIABLES WHERE Variable_name LIKE 'character_set_%' OR Variable_name LIKE 'collation%';'

It should bring up a table of your collations, they should all read utf8 Possible causes

Heptode answered 27/4, 2020 at 11:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.