Linux17 MySQL_installation

1,060 views
909 views

Published on

MySQL on Linux

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,060
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
41
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Linux17 MySQL_installation

  1. 1. MySQL on Linux jainul.musani@gmail.com 1
  2. 2. MySQL Database: • MySQL is developed, marketed, and supported by MySQL AB. • Swedish company MySQL on Linux 2
  3. 3. MySQL Database: • Fast • Easy-to-use RDBMS • For small and big businesses MySQL on Linux 3
  4. 4. MySQL Database - Popular: • an open-source license - nothing to pay to use it. • very powerful program • handles a large subset of the functionality of the most expensive and powerful database packages MySQL on Linux 4
  5. 5. MySQL Database - Popular: • uses a standard form of the well-known SQL data language. • works on many operating systems • with many languages including PHP, PERL, C, C++, JAVA, etc. MySQL on Linux 5
  6. 6. MySQL Database - Popular: • works very quickly and works well even with large data sets. • very friendly to PHP - for web development. • supports large databases - up to 50 million rows or more in a table. MySQL on Linux 6
  7. 7. MySQL Database - Popular: • default file size limit for a table is 4GB – [a theoretical limit of 8 million terabytes (TB)]. • customizable - allows programmers to modify the MySQL software to fit their own specific environments. MySQL on Linux 7
  8. 8. Downloading MySQL • All downloads for MySQL are located at MySQL Downloads 1)http://www.mysql.com/downloads 2)http://dev.mysql.com/downloads/mysql /5.1.html MySQL on Linux 8
  9. 9. Downloading MySQL • Pick the version and the platform of MySQL Community Server you want. downloaded the “Red Hat Enterprise Linux 5 RPM (x86)” 1. MySQL-client-community-5.1.25-0.rhel5.i386.rpm 2. MySQL-server-community-5.1.25-0.rhel5.i386.rpm 3. MySQL-devel-community-5.1.25-0.rhel5.i386.rpm MySQL on Linux 9
  10. 10. Downloading MySQL • The recommended way to install MySQL on a Linux system is via RPM. MySQL AB makes the following RPMs available for download on its web site: 1.MySQL - The MySQL database server, which manages databases and tables, controls user access, and processes SQL queries. MySQL on Linux 10
  11. 11. Downloading MySQL 2. MySQL-client - MySQL client programs, which make it possible to connect to and interact with the server. 3. MySQL-devel - Libraries and header files that come in handy when compiling other programs that use MySQL. 4. MySQL-shared - Shared libraries for the MySQL client. 5. MySQL-bench - Benchmark and performance testing tools for the MySQL database server. MySQL on Linux 11
  12. 12. Downloading MySQL The MySQL RPMs listed here are all built on a SuSE Linux system, but they'll usually work on other Linux variants with no difficulty. MySQL on Linux 12
  13. 13. Downloading MySQL• Remove the existing default MySQL that came with the Linux distribution: Do not perform this on an system where the MySQL database is getting used by some application MySQL on Linux 13
  14. 14. 14 • Now, follow the following steps to proceed for installation: • Login to the system using root user. • Switch to the directory containing the RPMs: • Install the MySQL database server by executing the following command. Remember to replace the filename in italics with the file name of your RPM. Installing MySQL
  15. 15. 15 Installing MySQL • This is optinal but recommanded step to install the remaining RPMs_
  16. 16. Verifying MySQL Installation 16 • After MySQL has been successfully installed, the base tables have been initialized, and the server has been started, you can verify that all is working as it should via some simple tests. • Use the mysqladmin Utility to Obtain Server Status: • Use mysqladmin binary to check server version. This binary would be available in /usr/bin on linux and in C:mysqlbin on windows.
  17. 17. 17 It will produce the following result on Linux Verifying MySQL Installation
  18. 18. Follows the steps below to stop and start MySQL 18
  19. 19. Post Installation Steps: 19 MySQL ships with a blank password for the root MySQL user. As soon as you have successfully installed the database and client, you need to set a root password as follows:
  20. 20. Connect to MySQL 20 Now to make a connection to your MySQL server, you would have to use the following command:
  21. 21. Connect to MySQL 21
  22. 22. Running MySQL at boot time: 22 If you want to run MySQL server at boot time, then make sure you have following entry in /etc/rc.local file.
  23. 23. Execute simple SQL commands using MySQL Client: 23 You can connect to your MySQL server by using MySQL client using mysql command. At this moment, you do not need to give any password as by default it will be set to blank.
  24. 24. Execute simple SQL commands using MySQL Client: 24
  25. 25. Running and Shutting down MySQL Server: 25 First check if your MySQL server is running or not. You can use the following command to check this: If your MySql is running, then you will see mysqld process listed out in your result.
  26. 26. Running and Shutting down MySQL Server: 26 If server is not running, then you can start it by using the following command:
  27. 27. Running and Shutting down MySQL Server: 27 if you want to shut down an already running MySQL server, then you can do it by using the following command:
  28. 28. Bibliography 1) https://dev.mysql.com/doc/refman/5.1/en/linux- installation-rpm.html 2) http://www.tutorialspoint.com/mysql/mysql- administration.htm 3) http://www.thegeekstuff.com/2008/07/howto-install- mysql-on-linux/ 4) http://www.cyberciti.biz/faq/how-to-install-mysql- under-rhel/ 28

×