-1

I installed mysql with the following command sudo apt-get install mysql-server and it got installed correclty.then i uninstalled it by refering this link

https://stackoverflow.com/questions/10853004/removing-mysql-5-5-completely

first answer,

then tried install 5.0.96 fro their official site doenloading the rpm, converting to deb, and installing it, it failed, again i purged everything rebooted and tried to install with the same old command

sudo apt-get install mysql-server

but every thing will go correclty till this place and will get stuck i waited for about an hour,

this is the terminal log

mukund@mukund-ThinkPad-Edge-E431:~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
libdbd-mysql-perl libmysqlclient18 mysql-client-5.5 mysql-client-core-5.5
 mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
 tinyca mailx
The following NEW packages will be installed:
 libdbd-mysql-perl libmysqlclient18 mysql-client-5.5 mysql-client-core-5.5
 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
 0 upgraded, 8 newly installed, 0 to remove and 30 not upgraded.
 Need to get 0 B/8,351 kB of archives.
 After this operation, 94.1 MB of additional disk space will be used.
 Do you want to continue? [Y/n] y
 Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 235747 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.5.47-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-common (5.5.47-0ubuntu0.14.04.1) ...
Selecting previously unselected package libmysqlclient18:amd64.
Preparing to unpack    .../libmysqlclient18_5.5.47-0ubuntu0.14.04.1_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.5.47-0ubuntu0.14.04.1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.025-1_amd64.deb ...
 Unpacking libdbd-mysql-perl (4.025-1) ...
Selecting previously unselected package mysql-client-core-5.5.
Preparing to unpack .../mysql-client-   core-5.5_5.5.47-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-client-core-5.5 (5.5.47-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack .../mysql-client- 5.5_5.5.47-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-client-5.5 (5.5.47-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-5.5_5.5.47-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-server-core-5.5 (5.5.47-0ubuntu0.14.04.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up mysql-common (5.5.47-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-server-5.5.




(Reading database ... 235938 files and directories currently installed.)
Preparing to unpack .../mysql-server- 5.5_5.5.47-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-server-5.5 (5.5.47-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.47-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-server (5.5.47-0ubuntu0.14.04.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Setting up libmysqlclient18:amd64 (5.5.47-0ubuntu0.14.04.1) ...
Setting up libdbd-mysql-perl (4.025-1) ...
Setting up mysql-client-core-5.5 (5.5.47-0ubuntu0.14.04.1) ...
Setting up mysql-client-5.5 (5.5.47-0ubuntu0.14.04.1) ...
Setting up mysql-server-core-5.5 (5.5.47-0ubuntu0.14.04.1) ...
Setting up mysql-server-5.5 (5.5.47-0ubuntu0.14.04.1) ...
160407 14:27:27 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160407 14:27:27 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release.  Please use the full name instead.
160407 14:27:27 [Note] /usr/sbin/mysqld (mysqld 5.5.47-0ubuntu0.14.04.1-log) starting as process 2327 ...

and said an error message about password, says that user already exists i clicked ok, then nothing.......

please help me in this matter

this is the mysql/error.log

160408 15:05:46 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160408 15:05:46 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
160408 15:05:46 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
160408 15:05:46 InnoDB: The InnoDB memory heap is disabled
160408 15:05:46 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160408 15:05:46 InnoDB: Compressed tables use zlib 1.2.8
160408 15:05:46 InnoDB: Using Linux native AIO
160408 15:05:46 InnoDB: Initializing buffer pool, size = 128.0M
160408 15:05:46 InnoDB: Completed initialization of buffer pool
160408 15:05:46 InnoDB: highest supported file format is Barracuda.
160408 15:05:46  InnoDB: Waiting for the background threads to start
160408 15:05:47 InnoDB: 5.5.47 started; log sequence number 1595675
160408 15:05:47 [ERROR] /usr/sbin/mysqld: unknown option '--skip-locking'
160408 15:05:47 [ERROR] Aborting

160408 15:05:47  InnoDB: Starting shutdown...
7
  • Is it already running? Find out with sudo service mysql status. If it isn't running, find out why in /var/log/mysql/error.log.
    – Jos
    Apr 8, 2016 at 9:23
  • this is what i get mysql start/post-start, process 8756 post-start process 8757 and when i try to start it via mysql -u root -p i am getting this ` Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)`
    – Mukund
    Apr 8, 2016 at 9:32
  • So, anything in /var/log/mysql/error.log?
    – Jos
    Apr 8, 2016 at 11:09
  • i posted it in question itself
    – Mukund
    Apr 8, 2016 at 11:13
  • Try removing /etc/my.cnf and restarting mysql. Then run mysql_upgrade -u <user> -p.
    – Jos
    Apr 8, 2016 at 11:25

2 Answers 2

3

Try:

sudo service mysql stop

then:

sudo apt-get purge mysql-server
sudo apt-get autoremove
less /etc/passwd

Check right at the bottom if there is a mysql user. If there is:

sudo userdel mysql

After all this is done, try to install Mysql again using the command you used previously.

2
  • it almost worked, when i tried mysql -u root -p it throws an error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) and on googling i ran it like this 'mysql -u root' then it worked. is there any problem in running like this?
    – Mukund
    Apr 8, 2016 at 13:20
  • 1
    No, I run mine like that as well. However be careful to enter the password in the clear. I usually use mysql -u root -p and will then be prompted for a password. Also I would suggest adding a password for the mysql root user. Another google search should show how to do this quite quickly
    – warhansen
    Apr 8, 2016 at 13:21
0

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

the error occur when mysql service not start.

no need to remove mysql.

please follow mentioned below steps: $ sudo su

/etc/init.d/mysql start

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .