Mysqladmin not working , already added mysql in startup

I have been reading “Build Your Own Database Driven Web Site Using PHP & MySQL” .I have installed mysql according to instructions in the book for linux OS(mine is ubuntu 14.04) .I successfully installed mysql apache and php but after that under the topic post installation set up task i ran the command “mysqladmin -u root status” and i get this message:
The program ‘mysqladmin’ can be found in the following packages:

  • mysql-client-5.5
  • mariadb-client-5.5
  • mysql-client-5.6
  • percona-xtradb-cluster-client-5.5
    Try: apt-get install
    please help
    Edit: I have looked into the directory /usr/local/mysql and i am able to locate mysqladmin program

You need to install one of suggested packages

Run

sudo apt-get install mysql-client-5.6

in the terminal

@megazoid thanks for the quick reply . I have tried installing all the above package and none seem to work ,i will do them once again . I looked into the mysql installation directory and there is a program name mysqladmin but i am not able to run that.

@megazoid If such an installation was required why did’nt the author mention in the instructions.

Does it work if called with full path?

/usr/local/mysql/mysqladmin

I don’t know. I can only guess that exact instructions may vary for different Linux distros and even versions of the same distro, so author couldn’t cover all possible options.

@megazoid I get a not a directory message even though i can see it in the files. :frowning:

@megazoid I installed mysql client once again now i get this message

mysqladmin: connect to server at ‘localhost’ failed
error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’
Check that mysqld is running and that the socket: ‘/var/run/mysqld/mysqld.sock’ exists!

Start MySQL server before running mysqladmin

sudo service mysql start

I get an unrecognized service message
i am gonna restart and try the same again
I still get the same error

How about

sudo /etc/init.d/mysql start

@megazoid sudo /etc/init.d/mysql start this command was not recognized
but i entered this:
sudo /etc/init.d/mysql.server start
and now i get this:
Starting MySQL

  • Couldn’t find MySQL manager (/usr/bin/mysqlmanager) or server (/usr/bin/mysqld_safe)

@megazoid please help :frowning:

Sorry, my knowledge of such things is limited too
For me it seems like an incorrectly installed MySQL server, but I may be wrong.
I’d reinstall everything using more recent tutorial, like this one, but you can wait for advice from someone more advanced in Linux than me

@megazoid thanks a lot . Can you tell me the commands to remove mysql files and anything related to it.? I am a day old in linux .

Run these commands (one by one)

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

Thanks for the help. :smiley:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.