Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I ran the following from the terminal:

sudo apt-get install mysql-server mysql-client

I then checked to see if MySQL was running:

sudo netstat -tap | grep mysql

I saw something similar to this:

tcp 0 0 localhost:mysql : LISTEN 2556/mysqld

I knew I also needed the MySQL Workbench, so I went to the software center and downloaded the Workbench.

When I checked to see if MySQL was running, I saw the following

$ sudo netstat -tap | grep mysql
tcp        0      0 localhost:mysql         *:*                     LISTEN      1003/mysqld    
tcp        0      0 localhost:52515         localhost:mysql         ESTABLISHED 3167/mysql-workbenc
tcp        0      0 localhost:mysql         localhost:52514         TIME_WAIT   -              
tcp        0      0 localhost:mysql         localhost:52516         ESTABLISHED 1003/mysqld    
tcp        0      0 localhost:52516         localhost:mysql         ESTABLISHED 3167/mysql-workbenc
tcp        0      0 localhost:mysql         localhost:52515         ESTABLISHED 1003/mysqld

My question is, have I over-installed some portion of MySQL? I just want to take care of what I need to, prior to going into some more development.

share|improve this question

2 Answers 2

What would "over-installed" mean? Servers processes are in the business of opening multiple, simultaneous connections; that's kinda what "server" means.

Even network intensive programs like browsers have multiple connections:

$ sudo netstat -ntap | grep chrome
tcp        0      0 192.168.2.4:33424   example:80       ESTABLISHED 1579/chrome     
tcp        0      0 192.168.2.4:59647   example:80       ESTABLISHED 1579/chrome     
tcp        0      0 192.168.2.4:37446   example:5222     ESTABLISHED 1579/chrome     
tcp        0      0 192.168.2.4:48011   example:443      ESTABLISHED 1579/chrome     
... 20 more connections omitted for brevity ...

Sockets are cheap, especially when they aren't busy.

share|improve this answer
1  
In the comparison of the netstat check before installing the GUI Workbench and after. Humbly, I do not know if I understand enough about the MySQL install to know if the server install and the Workbench install overlapped anything such as connections. I am glad that you mentioned what you did about servers being in the business of opening multiple/simultaneous connections. That makes sense to me. I just did not think that would be happening as early in the process as it did, but I plead my ignorance on the totality of understanding. At least I can rule out an ititial mistake. Thank you msw! –  David May 31 '13 at 12:45
    
@David Well, the workbench holds open a socket to your server as part of its operation. It's also not uncommon for processes to have sockets open to themselves for various reasons. –  Nathan C Sep 23 '13 at 17:11

Well for me it appears like this:

cyrex@cyrex:~$ sudo netstat -tap | grep mysql
[sudo] password for cyrex: 
tcp        0      0 localhost:mysql         *:*                     LISTEN      1294/mysqld     

What I would do is first (Am assuming you do not have any information in the database yet):

sudo service mysql stop

then

ps -e| grep mysql

If anything mysql related appears there kill it:

sudo killall mysqld

Double check to see if it still there with the ps command above. If it is then kill it:

sudo kill -9 PID where the PID is the ID of the process. Then double check again, if there is no more mysql process running around then:

sudo service mysql start

You actually reminded me of something that happened a long time ago (Ubuntu 9.10 I think). It was the same thing but about 20 more processes.

share|improve this answer
    
Interesting. Ok, Luis, thank you. When I get a moment, I will look into these suggestions. I appreciate this, and may have a follow-up if I get stuck. ~David –  David May 31 '13 at 12:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.