Advertisement
Sheroman1

mysql install log

Jan 27th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 16.88 KB | None | 0 0
  1. ********************************************************************************
  2. * This is the full install log of mysql database
  3. *
  4. * Original article: http://www.hackleague.blogspot.com
  5. *
  6. ********************************************************************************
  7.  
  8. 1. Check whether mysql group bundle is available using grouplist
  9.  
  10. # yum grouplist
  11. Loaded plugins: fastestmirror
  12. Setting up Group Process
  13. Loading mirror speeds from cached hostfile
  14.  * addons: mirrors.serveraxis.net
  15.  * base: mirrors.versaweb.com
  16.  * extras: mirror.hmc.edu
  17.  * updates: mirror.stanford.edu
  18. Installed Groups:
  19.    Dialup Networking Support
  20.    Editors
  21.    Mail Server
  22.    Network Servers
  23.    System Tools
  24.    Text-based Internet
  25.    Yum Utilities
  26. Available Groups:
  27.    Administration Tools
  28.    Authoring and Publishing
  29.    Base
  30.    Beagle
  31.    Cluster Storage
  32.    Clustering
  33.    DNS Name Server
  34.    Development Libraries
  35.    Development Tools
  36.    Emacs
  37.    Engineering and Scientific
  38.    FTP Server
  39.    FreeNX and NX
  40.    GNOME Desktop Environment
  41.    GNOME Software Development
  42.    Games and Entertainment
  43.    Graphical Internet
  44.    Graphics
  45.    Horde
  46.    Java
  47.    Java Development
  48.    KDE (K Desktop Environment)
  49.    KDE Software Development
  50.    KVM
  51.    Legacy Network Server
  52.    Legacy Software Development
  53.    Legacy Software Support
  54.    Mono
  55.    MySQL Database
  56.    News Server
  57.    Office/Productivity
  58.    OpenFabrics Enterprise Distribution
  59.    PostgreSQL Database
  60.    Printing Support
  61.    Ruby
  62.    Server Configuration Tools
  63.    Sound and Video
  64.    Tomboy
  65.    Virtualization
  66.    Web Server
  67.    Windows File Server
  68.    X Software Development
  69.    X Window System
  70.    XFCE-4.4
  71. Done
  72.  
  73. 2. Identify all the packages that comes with the mysql group bundle
  74.  
  75. # yum groupinfo "MySQL Database"
  76. Loaded plugins: fastestmirror
  77. Setting up Group Process
  78. Loading mirror speeds from cached hostfile
  79.  * addons: mirrors.serveraxis.net
  80.  * base: mirror.facebook.net
  81.  * extras: mirror.hmc.edu
  82.  * updates: mirror.stanford.edu
  83.  
  84. Group: MySQL Database
  85.  Description: This package group contains packages useful for use with MySQL.
  86.  Mandatory Packages:
  87.    mysql
  88.  Default Packages:
  89.    MySQL-python
  90.    libdbi-dbd-mysql
  91.    mysql-connector-odbc
  92.    mysql-server
  93.    perl-DBD-MySQL
  94.    unixODBC
  95.  Optional Packages:
  96.    mod_auth_mysql
  97.    mysql-bench
  98.    mysql-devel
  99.    php-mysql
  100.    qt-MySQL
  101.  
  102.  
  103. 3. Install the mysql database bundle
  104.  
  105. # yum groupinstall "MySQL Database"
  106. Loaded plugins: fastestmirror
  107. Loading mirror speeds from cached hostfile
  108.  * addons: mirrors.netdna.com
  109.  * base: mirror.facebook.net
  110.  * extras: mirror.hmc.edu
  111.  * updates: mirror.skiplink.com
  112. Setting up Group Process
  113. Checking for new repos for mirrors
  114. Resolving Dependencies
  115. --> Running transaction check
  116. ---> Package MySQL-python.i386 0:1.2.1-1 set to be updated
  117. --> Processing Dependency: mx for package: MySQL-python
  118. ---> Package libdbi-dbd-mysql.i386 0:0.8.1a-1.2.2 set to be updated
  119. --> Processing Dependency: libdbi-drivers = 0.8.1a-1.2.2 for package: libdbi-dbd-mysql
  120. ---> Package mysql.i386 0:5.0.77-4.el5_4.2 set to be updated
  121. --> Processing Dependency: perl(DBI) for package: mysql
  122. ---> Package mysql-connector-odbc.i386 0:3.51.26r1127-1.el5 set to be updated
  123. --> Processing Dependency: libltdl.so.3 for package: mysql-connector-odbc
  124. ---> Package mysql-server.i386 0:5.0.77-4.el5_4.2 set to be updated
  125. ---> Package perl-DBD-MySQL.i386 0:3.0007-2.el5 set to be updated
  126. ---> Package unixODBC.i386 0:2.2.11-7.1 set to be updated
  127. --> Running transaction check
  128. ---> Package libdbi-drivers.i386 0:0.8.1a-1.2.2 set to be updated
  129. --> Processing Dependency: libdbi >= 0.8 for package: libdbi-drivers
  130. ---> Package libtool-ltdl.i386 0:1.5.22-7.el5_4 set to be updated
  131. ---> Package mx.i386 0:2.0.6-2.2.2 set to be updated
  132. ---> Package perl-DBI.i386 0:1.52-2.el5 set to be updated
  133. --> Running transaction check
  134. ---> Package libdbi.i386 0:0.8.1-2.1 set to be updated
  135. --> Finished Dependency Resolution
  136.  
  137. Dependencies Resolved
  138.  
  139. =============================================================================================================================================================
  140.  Package                                      Arch                         Version                                     Repository                       Size
  141. =============================================================================================================================================================
  142. Installing:
  143.  MySQL-python                                 i386                         1.2.1-1                                     base                             82 k
  144.  libdbi-dbd-mysql                             i386                         0.8.1a-1.2.2                                base                             17 k
  145.  mysql                                        i386                         5.0.77-4.el5_4.2                            updates                         4.8 M
  146.  mysql-connector-odbc                         i386                         3.51.26r1127-1.el5                          base                            159 k
  147.  mysql-server                                 i386                         5.0.77-4.el5_4.2                            updates                         9.8 M
  148.  perl-DBD-MySQL                               i386                         3.0007-2.el5                                base                            148 k
  149.  unixODBC                                     i386                         2.2.11-7.1                                  base                            832 k
  150. Installing for dependencies:
  151.  libdbi                                       i386                         0.8.1-2.1                                   base                             35 k
  152.  libdbi-drivers                               i386                         0.8.1a-1.2.2                                base                             14 k
  153.  libtool-ltdl                                 i386                         1.5.22-7.el5_4                              updates                          37 k
  154.  mx                                           i386                         2.0.6-2.2.2                                 base                            558 k
  155.  perl-DBI                                     i386                         1.52-2.el5                                  base                            600 k
  156.  
  157. Transaction Summary
  158. =============================================================================================================================================================
  159. Install     12 Package(s)        
  160. Update       0 Package(s)        
  161. Remove       0 Package(s)        
  162.  
  163. Total download size: 17 M
  164. Is this ok [y/N]: y
  165. Downloading Packages:
  166. (1/12): libdbi-drivers-0.8.1a-1.2.2.i386.rpm                                                                                          |  14 kB     00:00    
  167. (2/12): libdbi-dbd-mysql-0.8.1a-1.2.2.i386.rpm                                                                                        |  17 kB     00:00    
  168. (3/12): libdbi-0.8.1-2.1.i386.rpm                                                                                                     |  35 kB     00:00    
  169. (4/12): libtool-ltdl-1.5.22-7.el5_4.i386.rpm                                                                                          |  37 kB     00:00    
  170. (5/12): MySQL-python-1.2.1-1.i386.rpm                                                                                                 |  82 kB     00:00    
  171. (6/12): perl-DBD-MySQL-3.0007-2.el5.i386.rpm                                                                                          | 148 kB     00:00    
  172. (7/12): mysql-connector-odbc-3.51.26r1127-1.el5.i386.rpm                                                                              | 159 kB     00:00    
  173. (8/12): mx-2.0.6-2.2.2.i386.rpm                                                                                                       | 558 kB     00:00    
  174. (9/12): perl-DBI-1.52-2.el5.i386.rpm                                                                                                  | 600 kB     00:00    
  175. (10/12): unixODBC-2.2.11-7.1.i386.rpm                                                                                                 | 832 kB     00:00    
  176. (11/12): mysql-5.0.77-4.el5_4.2.i386.rpm                                                                                              | 4.8 MB     00:01    
  177. (12/12): mysql-server-5.0.77-4.el5_4.2.i386.rpm                                                                                       | 9.8 MB     00:01    
  178. -------------------------------------------------------------------------------------------------------------------------------------------------------------
  179. Total                                                                                                                        4.5 MB/s |  17 MB     00:03    
  180. Running rpm_check_debug
  181. Running Transaction Test
  182. Finished Transaction Test
  183. Transaction Test Succeeded
  184. Running Transaction
  185.   Installing     : perl-DBI                                                                                                                             1/12
  186.   Installing     : mysql                                                                                                                                2/12
  187.   Installing     : perl-DBD-MySQL                                                                                                                       3/12
  188.   Installing     : mx                                                                                                                                   4/12
  189.   Installing     : libdbi                                                                                                                               5/12
  190.   Installing     : libtool-ltdl                                                                                                                         6/12
  191.   Installing     : unixODBC                                                                                                                             7/12
  192.   Installing     : mysql-connector-odbc                                                                                                                 8/12
  193.   Installing     : MySQL-python                                                                                                                         9/12
  194.   Installing     : mysql-server                                                                                                                        10/12
  195.   Installing     : libdbi-drivers                                                                                                                      11/12
  196.   Installing     : libdbi-dbd-mysql                                                                                                                    12/12
  197.  
  198. Installed:
  199.   MySQL-python.i386 0:1.2.1-1           libdbi-dbd-mysql.i386 0:0.8.1a-1.2.2  mysql.i386 0:5.0.77-4.el5_4.2  mysql-connector-odbc.i386 0:3.51.26r1127-1.el5
  200.   mysql-server.i386 0:5.0.77-4.el5_4.2  perl-DBD-MySQL.i386 0:3.0007-2.el5    unixODBC.i386 0:2.2.11-7.1    
  201.  
  202. Dependency Installed:
  203.   libdbi.i386 0:0.8.1-2.1   libdbi-drivers.i386 0:0.8.1a-1.2.2   libtool-ltdl.i386 0:1.5.22-7.el5_4   mx.i386 0:2.0.6-2.2.2   perl-DBI.i386 0:1.52-2.el5  
  204.  
  205. Complete!
  206.  
  207. 4. Verify the installation
  208.  
  209. # rpm -qa | grep -i mysql
  210. MySQL-python-1.2.1-1
  211. mysql-5.0.77-4.el5_4.2
  212. mysql-connector-odbc-3.51.26r1127-1.el5
  213. mysql-server-5.0.77-4.el5_4.2
  214. libdbi-dbd-mysql-0.8.1a-1.2.2
  215. perl-DBD-MySQL-3.0007-2.el5
  216.  
  217. # grep mysql /etc/passwd
  218. mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
  219.  
  220. # grep mysql /etc/group
  221. mysql:x:27:
  222.  
  223. 5. Execute mysql_install_db
  224.  
  225. # /usr/bin/mysql_install_db --user=mysql
  226. Installing MySQL system tables...
  227. 100325 14:48:35 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  228. 100325 14:48:35 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  229. OK
  230. Filling help tables...
  231. 100325 14:48:35 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  232. 100325 14:48:35 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
  233. OK
  234.  
  235. To start mysqld at boot time you have to copy
  236. support-files/mysql.server to the right place for your system
  237.  
  238. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
  239. To do so, start the server, then issue the following commands:
  240. /usr/bin/mysqladmin -u root password 'new-password'
  241. /usr/bin/mysqladmin -u root -h dev password 'new-password'
  242.  
  243. Alternatively you can run:
  244. /usr/bin/mysql_secure_installation
  245.  
  246. which will also give you the option of removing the test
  247. databases and anonymous user created by default.  This is
  248. strongly recommended for production servers.
  249.  
  250. See the manual for more instructions.
  251.  
  252. You can start the MySQL daemon with:
  253. cd /usr ; /usr/bin/mysqld_safe &
  254.  
  255. You can test the MySQL daemon with mysql-test-run.pl
  256. cd mysql-test ; perl mysql-test-run.pl
  257.  
  258. Please report any problems with the /usr/bin/mysqlbug script!
  259.  
  260. The latest information about MySQL is available on the web at
  261. http://www.mysql.com
  262. Support MySQL by buying support/licenses at http://shop.mysql.com
  263.  
  264. 6. MySQL Data directory will contain default databases as shown below.
  265.  
  266. # grep datadir /etc/my.cnf
  267. datadir=/var/lib/mysql
  268.  
  269. # ls -l /var/lib/mysql/
  270. total 16
  271. drwx------ 2 mysql root 4096 Mar 25 14:48 mysql
  272. drwx------ 2 mysql root 4096 Mar 25 14:48 test
  273.  
  274. 7. Start mysql server
  275.  
  276. # service mysqld status
  277. mysqld is stopped
  278.  
  279. # service mysqld start
  280. Starting MySQL:                                            [  OK  ]
  281.  
  282. 8. Verify the db up and running
  283.  
  284. # /usr/bin/mysqladmin version
  285. /usr/bin/mysqladmin  Ver 8.41 Distrib 5.0.77, for redhat-linux-gnu on i686
  286. Copyright (C) 2000-2006 MySQL AB
  287. This software comes with ABSOLUTELY NO WARRANTY. This is free software,
  288. and you are welcome to modify and redistribute it under the GPL license
  289.  
  290. Server version      5.0.77
  291. Protocol version    10
  292. Connection      Localhost via UNIX socket
  293. UNIX socket     /var/lib/mysql/mysql.sock
  294. Uptime:         39 sec
  295.  
  296. Threads: 1  Questions: 2  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 6  Queries per second avg: 0.051
  297.  
  298. # /usr/bin/mysqlshow
  299. +--------------------+
  300. |     Databases      |
  301. +--------------------+
  302. | information_schema |
  303. | mysql              |
  304. | test               |
  305. +--------------------+
  306.  
  307. # /usr/bin/mysqlshow mysql
  308. Database: mysql
  309. +---------------------------+
  310. |          Tables           |
  311. +---------------------------+
  312. | columns_priv              |
  313. | db                        |
  314. | func                      |
  315. | help_category             |
  316. | help_keyword              |
  317. | help_relation             |
  318. | help_topic                |
  319. | host                      |
  320. | proc                      |
  321. | procs_priv                |
  322. | tables_priv               |
  323. | time_zone                 |
  324. | time_zone_leap_second     |
  325. | time_zone_name            |
  326. | time_zone_transition      |
  327. | time_zone_transition_type |
  328. | user                      |
  329. +---------------------------+
  330.  
  331. 9. make sure you are able to start and stop the service
  332.  
  333. # service mysqld stop
  334. Stopping MySQL:                                            [  OK  ]
  335.  
  336. # /usr/bin/mysqladmin version
  337. /usr/bin/mysqladmin: connect to server at 'localhost' failed
  338. error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
  339. Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
  340.  
  341. # servier mysqld start
  342. -bash: servier: command not found
  343.  
  344. # service mysqld start
  345. Starting MySQL:                                            [  OK  ]
  346.  
  347. 10.  Change the root account passwords as shown below.
  348.  
  349. # mysql -u root
  350. Welcome to the MySQL monitor.  Commands end with ; or \g.
  351. Your MySQL connection id is 5
  352. Server version: 5.0.77 Source distribution
  353.  
  354. Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
  355.  
  356. mysql> select host, user from mysql.user;
  357. +-----------+------+
  358. | host      | user |
  359. +-----------+------+
  360. | 127.0.0.1 | root |
  361. | dev       |      |
  362. | dev       | root |
  363. | localhost |      |
  364. | localhost | root |
  365. +-----------+------+
  366. 5 rows in set (0.00 sec)
  367.  
  368. mysql> set password for 'root'@'localhost' = PASSWORD('NotFor2EveryBody');
  369. Query OK, 0 rows affected (0.00 sec)
  370.  
  371. mysql> set password for 'root'@'dev' = PASSWORD('NotFor2EveryBody');
  372. Query OK, 0 rows affected (0.00 sec)
  373.  
  374. mysql> set password for 'root'@'127.0.0.1' = PASSWORD('NotFor2EveryBody');
  375. Query OK, 0 rows affected (0.00 sec)
  376.  
  377. mysql>
  378.  
  379. 11. Verify the new password for root account
  380.  
  381. # mysql -u root
  382. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  383.  
  384. # mysql -u root -p
  385. Enter password:
  386. Welcome to the MySQL monitor.  Commands end with ; or \g.
  387. Your MySQL connection id is 7
  388. Server version: 5.0.77 Source distribution
  389.  
  390. Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
  391.  
  392. mysql> exit
  393. Bye
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement