Database management system is necessary every where whether it’s a web application or other business purpose software;in ubuntu 10.04 you may like to use MySQL,the fastest database management system for web applications.
MySQL is one of the most widely used database management system and it is light,free and open source so it is also in resonance with ubuntu philosophy.The aim of this post is to help you in installing mysql on your ubuntu 10.04 to help you in getting started with mysql.
Install MySQL on Ubuntu 10.04
1. First,Open SPM(Synaptic Package Manager) from System->Administration->Synaptic Package Manager.Enter your password(Ubuntu login account) if it ask else,proceed to next step.
2. Now search for “mysql” by using the Quick Search box(on Top Upper part of the window).
3. Mark the package’s box you want to install e.g my sql client ,server ….
4. Now click on Apply to begin the installation(Followed by downloading process).
5. After few minutes,when the download will complete,installation begins automatically.It will hardly takes couple of minutes.In middle of installation you will have to enter root password for MySQL server.Enter a strong password for that.
6. You have installed MySQL(Client/server) on your Ubuntu 10.04 Lucid Lynx.
7. That’s All…if you find any problem in installing mysql,let me know through comments.
Using MySQL in Ubuntu 10.04
To access Mysql server you can use following command in the linux terminal.
General format of the command
mysql -u user -h host -p (After hitting enter it will ask for mysql user’s password)
Running as localhost
mysql -u root -h localhost -p (Enter the root password that you entered at the time of installation)
You can also install MySQL query browser(From Ubuntu Software Center) to make this process more simple.
thanx alot dear… for the adequate screenshots… an unseen small mistake wz enough to bring my life to a sandstill…
lots of thanks………….
Welcome!!
Awesome…clear and easy, just like I like them!
Good work.
Thanks Sryno…
thanks.. it really helped.. its people like you who make internet such a wonderful experience…
Always Welcome!! && very happy to know that ..I’m contributing something in making the Internet world better!
While installing the MySQL server, I got the following message popped up.
—————————————————
An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or because of a communication problem with the MySQL server.
You should check the account’s password after the package installation.
Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for more information.
—————————————————————————-
Here is the message that I am getting while trying to login as root. Can anyone help?
$ mysql -u root -h localhost -p
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
Here is the message that I am getting while trying to login as root. Can anyone help?
$ mysql -u root -h localhost -p
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
Run these commands in your terminal:
First:
sudo apt-get install mysql-server
If that goes successfully, run this in your terminal to make sure that mysql is running:
sudo netstat -tap | grep mysql
You should see something that resembles this:
tcp 0 0 localhost:mysql *:* LISTEN 14245/mysqld
Next run this in the terminal which will stop your mysql process and prompt you to enter a password for your root:
sudo dpkg-reconfigure mysql-server-5.1
Thank you so much. This helped.
Thanks for clearing things up. It is much appreciated!
Welcome!! 🙂
Thanks alot.
This saved me lots of time.
I followed your instructions to the letter, but when I tried sudo mysql -u user -h localhost -p it failed and gave me the following: ERROR 1045 (28000): Access denied for user ‘user’@’localhost’ (using password: YES). I can access localhost and 127.0.0.1 through my browser. What is wrong? Please mention MySQL in the subject line. Thanks
Respectfully
Vincent
Great, thank you so much, it was a big help 🙂
Welcome!! thanks for your appreciation.
when I follow your steps this is the error I’m getting: W: Failed to fetch http://za.archive.ubuntu.com/ubuntu/pool/main/libn/libnet-daemon-perl/libnet-daemon-perl_0.43-1_all.deb
Could not connect to za.archive.ubuntu.com:80 (155.232.191.229). – connect (110: Connection timed out)
I don’t know – about this problem…..
Hi,
I don’t have internet connection . I have mysql.tag.gz files with me. How do I install?
hi… i am installing mysql through the “sudo apt-get install mysql-server” command from my pc but it is taking lot of time ..what i have to do..
there are number of packages at package’s box e.g my sql client ,server …, which one i select from these?
packages got downloaded but not installed.
In this case what should be done???