+ All Categories
Home > Documents > Install MySQL Database

Install MySQL Database

Date post: 06-Apr-2018
Category:
Upload: kalaxmike
View: 237 times
Download: 0 times
Share this document with a friend

of 25

Transcript
  • 8/3/2019 Install MySQL Database

    1/25

    Install MySQL Database

    [root@atvntr3009 /]# yum groupinfo "MySQL Database"

    Loaded plugins: fastestmirror, priorities

    Setting up Group Process

    Loading mirror speeds from cached hostfile

    * base: yum.singlehop.com

    * extras: pubmirrors.reflected.net

    * updates: mirrors.serveraxis.net

    base | 1.1 kB 00:00

    extras | 2.1 kB 00:00

    updates | 1.9 kB 00:00

    Group: MySQL Database

    Description: This package group contains packages useful for use with MySQL.

    Mandatory Packages:

    mysql

    Default Packages:

    MySQL-python

    libdbi-dbd-mysql

    mysql-connector-odbc

    mysql-server

    perl-DBD-MySQL

    unixODBC

    Optional Packages:

    mod_auth_mysql

  • 8/3/2019 Install MySQL Database

    2/25

    mysql-bench

    mysql-devel

    php-mysql

    qt-MySQL

    [root@atvntr3009 /]#

    [root@atvntr3009 /]# yum groupinstall "MySQL Database"

    Loaded plugins: fastestmirror, priorities

    Loading mirror speeds from cached hostfile

    * base: yum.singlehop.com

    * extras: pubmirrors.reflected.net

    * updates: mirrors.serveraxis.net

    Setting up Group Process

    Checking for new repos for mirrors

    Package mysql-5.0.77-4.el5_6.6.x86_64 already installed and latest version

    Resolving Dependencies

    --> Running transaction check

    ---> Package MySQL-python.x86_64 0:1.2.1-1 set to be updated

    --> Processing Dependency: mx for package: MySQL-python

    ---> Package libdbi-dbd-mysql.x86_64 0:0.8.1a-1.2.2 set to be updated

    --> Processing Dependency: libdbi-drivers = 0.8.1a-1.2.2 for package: libdbi-dbd-mysql

    ---> Package mysql.i386 0:5.0.77-4.el5_6.6 set to be updated

    --> Processing Dependency: libncurses.so.5 for package: mysql

    --> Processing Dependency: libssl.so.6 for package: mysql

    --> Processing Dependency: libcrypto.so.6 for package: mysql

    --> Processing Dependency: libstdc++.so.6(CXXABI_1.3) for package: mysql

  • 8/3/2019 Install MySQL Database

    3/25

    --> Processing Dependency: libstdc++.so.6 for package: mysql

    ---> Package mysql-connector-odbc.x86_64 0:3.51.26r1127-1.el5 set to be updated

    --> Processing Dependency: libltdl.so.3()(64bit) for package: mysql-connector-odbc

    ---> Package mysql-server.x86_64 0:5.0.77-4.el5_6.6 set to be updated

    ---> Package perl-DBD-MySQL.x86_64 0:3.0007-2.el5 set to be updated

    ---> Package unixODBC.i386 0:2.2.11-7.1 set to be updated

    ---> Package unixODBC.x86_64 0:2.2.11-7.1 set to be updated

    --> Running transaction check

    ---> Package libdbi-drivers.x86_64 0:0.8.1a-1.2.2 set to be updated

    --> Processing Dependency: libdbi >= 0.8 for package: l ibdbi-drivers

    ---> Package libstdc++.i386 0:4.1.2-51.el5 set to be updated

    ---> Package libstdc++.x86_64 0:4.1.2-51.el5 set to be updated

    ---> Package libtool-ltdl.x86_64 0:1.5.22-7.el5_4 set to be updated

    ---> Package mx.x86_64 0:2.0.6-2.2.2 set to be updated

    ---> Package ncurses.i386 0:5.5-24.20060715 set to be updated

    ---> Package openssl.i686 0:0.9.8e-20.el5_7.1 set to be updated

    --> Processing Dependency: libgssapi_krb5.so.2 for package: openssl

    --> Processing Dependency: libkrb5.so.3(krb5_3_MIT) for package: openssl

    --> Processing Dependency: libk5crypto.so.3 for package: openssl

    --> Processing Dependency: libk5crypto.so.3(k5crypto_3_MIT) for package: openssl

    --> Processing Dependency: libcom_err.so.2 for package: openssl

    --> Processing Dependency: libkrb5.so.3 for package: openssl

    ---> Package openssl.x86_64 0:0.9.8e-20.el5_7.1 set to be updated

    --> Running transaction check

    --> Processing Dependency: e2fsprogs-libs = 1.39-23.el5_5.1 for package: e2fsprogs

  • 8/3/2019 Install MySQL Database

    4/25

    ---> Package e2fsprogs-libs.i386 0:1.39-33.el5 set to be updated

    --> Processing Dependency: libdevmapper.so.1.02 for package: e2fsprogs-libs

    ---> Package e2fsprogs-libs.x86_64 0:1.39-33.el5 set to be updated

    ---> Package krb5-libs.i386 0:1.6.1-63.el5_7 set to be updated

    --> Processing Dependency: libkeyutils.so.1 for package: krb5-libs

    --> Processing Dependency: libselinux.so.1 for package: krb5-libs

    --> Processing Dependency: libkeyutils.so.1(KEYUTILS_0.3) for package: krb5-libs

    ---> Package krb5-libs.x86_64 0:1.6.1-63.el5_7 set to be updated

    ---> Package libdbi.x86_64 0:0.8.1-2.1 set to be updated

    --> Running transaction check

    --> Processing Dependency: device-mapper = 1.02.55-2.el5 for package: device-mapper-event

    ---> Package device-mapper.i386 0:1.02.63-4.el5 set to be updated

    --> Processing Dependency: libsepol.so.1 for package: device-mapper

    ---> Package device-mapper.x86_64 0:1.02.63-4.el5 set to be updated

    ---> Package e2fsprogs.x86_64 0:1.39-33.el5 set to be updated

    ---> Package keyutils-libs.i386 0:1.2-1.el5 set to be updated

    ---> Package libselinux.i386 0:1.33.4-5.7.el5 set to be updated

    --> Running transaction check

    ---> Package device-mapper-event.x86_64 0:1.02.63-4.el5 set to be updated

    ---> Package libsepol.i386 0:1.15.2-3.el5 set to be updated

    --> Finished Dependency Resolution

    Dependencies Resolved

    =====================================================================================

    ===================================================================================

  • 8/3/2019 Install MySQL Database

    5/25

    Package Arch Version Repository

    Size

    =====================================================================================

    ===================================================================================

    Installing:

    MySQL-python x86_64 1.2.1-1 base

    84 k

    libdbi-dbd-mysql x86_64 0.8.1a-1.2.2 base

    21 k

    mysql i386 5.0.77-4.el5_6.6 base

    4.8 M

    mysql-connector-odbc x86_64 3.51.26r1127-1.el5 base

    158 k

    mysql-server x86_64 5.0.77-4.el5_6.6 base

    9.8 M

    perl-DBD-MySQL x86_64 3.0007-2.el5 base

    148 k

    unixODBC i386 2.2.11-7.1 base

    832 k

    unixODBC x86_64 2.2.11-7.1 base

    835 k

    Installing for dependencies:

    device-mapper i386 1.02.63-4.el5 base

    776 k

    e2fsprogs-libs i386 1.39-33.el5 base

    120 k

    keyutils-libs i386 1.2-1.el5 base

    18 k

    krb5-libs i386 1.6.1-63.el5_7 updates

    668 k

  • 8/3/2019 Install MySQL Database

    6/25

    libdbi x86_64 0.8.1-2.1 base

    37 k

    libdbi-drivers x86_64 0.8.1a-1.2.2 base

    13 k

    libselinux i386 1.33.4-5.7.el5 base

    77 k

    libsepol i386 1.15.2-3.el5 base

    128 k

    libstdc++ i386 4.1.2-51.el5 base

    362 k

    libtool-ltdl x86_64 1.5.22-7.el5_4 base

    38 k

    mx x86_64 2.0.6-2.2.2 base

    564 k

    ncurses i386 5.5-24.20060715 base

    1.1 M

    openssl i686 0.9.8e-20.el5_7.1 updates

    1.4 M

    Updating for dependencies:

    device-mapper x86_64 1.02.63-4.el5 base

    808 k

    device-mapper-event x86_64 1.02.63-4.el5 base

    23 k

    e2fsprogs x86_64 1.39-33.el5 base

    844 k

    e2fsprogs-libs x86_64 1.39-33.el5 base

    120 k

    krb5-libs x86_64 1.6.1-63.el5_7 updates

    680 k

    libstdc++ x86_64 4.1.2-51.el5 base

    353 k

  • 8/3/2019 Install MySQL Database

    7/25

    openssl x86_64 0.9.8e-20.el5_7.1 updates

    1.4 M

    Transaction Summary

    =====================================================================================

    ===================================================================================

    Install 21 Package(s)

    Upgrade 7 Package(s)

    Total download size: 26 M

    Is this ok [y/N]: y

    Downloading Packages:

    (1/28): libdbi-drivers-0.8.1a-1.2.2.x86_64.rpm |

    13 kB 00:00

    (2/28): keyutils-libs-1.2-1.el5.i386.rpm | 18 kB

    00:00

    (3/28): libdbi-dbd-mysql-0.8.1a-1.2.2.x86_64.rpm |

    21 kB 00:00

    (4/28): device-mapper-event-1.02.63-4.el5.x86_64.rpm

    | 23 kB 00:00

    (5/28): libdbi-0.8.1-2.1.x86_64.rpm | 37 kB

    00:00

    (6/28): libtool-ltdl-1.5.22-7.el5_4.x86_64.rpm |

    38 kB 00:00

    (7/28): libselinux-1.33.4-5.7.el5.i386.rpm | 77kB 00:00

    (8/28): MySQL-python-1.2.1-1.x86_64.rpm |

    84 kB 00:00

    (9/28): e2fsprogs-libs-1.39-33.el5.i386.rpm |

    120 kB 00:00

  • 8/3/2019 Install MySQL Database

    8/25

    (10/28): e2fsprogs-libs-1.39-33.el5.x86_64.rpm |

    120 kB 00:00

    (11/28): libsepol-1.15.2-3.el5.i386.rpm | 128

    kB 00:00

    (12/28): perl-DBD-MySQL-3.0007-2.el5.x86_64.rpm

    | 148 kB 00:00

    (13/28): mysql-connector-odbc-3.51.26r1127-1.el5.x86_64.rpm

    | 158 kB 00:00

    (14/28): libstdc++-4.1.2-51.el5.x86_64.rpm |

    353 kB 00:00

    (15/28): libstdc++-4.1.2-51.el5.i386.rpm | 362

    kB 00:00

    (16/28): mx-2.0.6-2.2.2.x86_64.rpm | 564

    kB 00:00

    (17/28): krb5-libs-1.6.1-63.el5_7.i386.rpm |

    668 kB 00:00

    (18/28): krb5-libs-1.6.1-63.el5_7.x86_64.rpm |

    680 kB 00:00

    (19/28): device-mapper-1.02.63-4.el5.i386.rpm |

    776 kB 00:00

    (20/28): device-mapper-1.02.63-4.el5.x86_64.rpm

    | 808 kB 00:00

    (21/28): unixODBC-2.2.11-7.1.i386.rpm | 832

    kB 00:00

    (22/28): unixODBC-2.2.11-7.1.x86_64.rpm |

    835 kB 00:00

    (23/28): e2fsprogs-1.39-33.el5.x86_64.rpm |844 kB 00:00

    (24/28): ncurses-5.5-24.20060715.i386.rpm |

    1.1 MB 00:00

    (25/28): openssl-0.9.8e-20.el5_7.1.i686.rpm |

    1.4 MB 00:00

  • 8/3/2019 Install MySQL Database

    9/25

    (26/28): openssl-0.9.8e-20.el5_7.1.x86_64.rpm |

    1.4 MB 00:00

    (27/28): mysql-5.0.77-4.el5_6.6.i386.rpm | 4.8

    MB 00:00

    (28/28): mysql-server-5.0.77-4.el5_6.6.x86_64.rpm

    | 9.8 MB 00:00

    ------------------------------------------------------------------------------------------------------------------------------------------

    ------------------------------

    Total 8.0 MB/s | 26 MB 00:03

    Running rpm_check_debug

    Running Transaction Test

    Finished Transaction Test

    Transaction Test Succeeded

    Running Transaction

    Updating : device-mapper

    1/35

    Updating : e2fsprogs-libs

    2/35

    Updating : krb5-libs 3/35

    Updating : openssl 4/35

    Updating : libstdc++ 5/35

    Installing : perl-DBD-MySQL

    6/35

    Installing : libtool-ltdl 7/35

    Installing : mx 8/35

    Installing : unixODBC 9/35

    Installing : libdbi 10/35

    Installing : libsepol 11/35

  • 8/3/2019 Install MySQL Database

    10/25

    Installing : libselinux 12/35

    Installing : device-mapper

    13/35

    Installing : e2fsprogs-libs

    14/35

    Installing : ncurses 15/35

    Installing : libstdc++ 16/35

    Installing : keyutils-libs 17/35

    Installing : mysql-connector-odbc

    18/35

    Updating : e2fsprogs19/35

    Updating : device-mapper-event

    20/35

    Installing : krb5-libs 21/35

    Installing : openssl 22/35

    warning: /etc/pki/tls/certs/ca-bundle.crt created as /etc/pki/tls/certs/ca-bundle.crt.rpmnew

    Installing : mysql 23/35

    Installing : mysql-server

    24/35

    Installing : MySQL-python

    25/35

    Installing : unixODBC

    26/35

    Installing : libdbi-drivers27/35

    Installing : libdbi-dbd-mysql

    28/35

    Cleanup : device-mapper-event

    29/35

  • 8/3/2019 Install MySQL Database

    11/25

    Cleanup : openssl 30/35

    Cleanup : libstdc++ 31/35

    Cleanup : device-mapper

    32/35

    Cleanup : krb5-libs 33/35

    Cleanup : e2fsprogs

    34/35

    Cleanup : e2fsprogs-libs

    35/35

    Installed:

    MySQL-python.x86_64 0:1.2.1-1 libdbi-dbd-mysql.x86_64 0:0.8.1a-1.2.2 mysql.i386 0:5.0.77-

    4.el5_6.6 mysql-connector-odbc.x86_64 0:3.51.26r1127-1.el5

    mysql-server.x86_64 0:5.0.77-4.el5_6.6 perl-DBD-MySQL.x86_64 0:3.0007-2.el5 unixODBC.i386

    0:2.2.11-7.1 unixODBC.x86_64 0:2.2.11-7.1

    Dependency Installed:

    device-mapper.i386 0:1.02.63-4.el5 e2fsprogs-libs.i386 0:1.39-33.el5 keyutils-libs.i386 0:1.2-

    1.el5 krb5-libs.i386 0:1.6.1-63.el5_7

    libdbi.x86_64 0:0.8.1-2.1 libdbi-drivers.x86_64 0:0.8.1a-1.2.2 libselinux.i386 0:1.33.4-

    5.7.el5 libsepol.i386 0:1.15.2-3.el5

    libstdc++.i386 0:4.1.2-51.el5 libtool-ltdl.x86_64 0:1.5.22-7.el5_4 mx.x86_64 0:2.0.6-2.2.2

    ncurses.i386 0:5.5-24.20060715

    openssl.i686 0:0.9.8e-20.el5_7.1

    Dependency Updated:

    device-mapper.x86_64 0:1.02.63-4.el5 device-mapper-event.x86_64 0:1.02.63-4.el5

    e2fsprogs.x86_64 0:1.39-33.el5 e2fsprogs-libs.x86_64 0:1.39-33.el5

  • 8/3/2019 Install MySQL Database

    12/25

    krb5-libs.x86_64 0:1.6.1-63.el5_7 libstdc++.x86_64 0:4.1.2-51.el5 openssl.x86_64 0:0.9.8e-

    20.el5_7.1

    Complete!

    [root@atvntr3009 /]#

    Verify the installation

    [root@atvntr3009 /]# rpm -qa | grep -i mysql

    mysql-5.0.77-4.el5_6.6

    php53-mysql-5.3.3-1.el5_7.5

    perl-DBD-MySQL-3.0007-2.el5

    mysql-connector-odbc-3.51.26r1127-1.el5

    mysql-server-5.0.77-4.el5_6.6

    libdbi-dbd-mysql-0.8.1a-1.2.2

    mysql-5.0.77-4.el5_6.6

    MySQL-python-1.2.1-1

    [root@atvntr3009 /]# grep mysql /etc/passwd

    mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash

    [root@atvntr3009 /]#

    # grep mysql /etc/group

    mysql:x:27:

  • 8/3/2019 Install MySQL Database

    13/25

    Installing REMI repository

    [root@atvntr3009 /]# yum search phpmyadmin

    Loaded plugins: fastestmirror, priorities

    Loading mirror speeds from cached hostfile

    * base: yum.singlehop.com

    * extras: pubmirrors.reflected.net

    * updates: mirrors.serveraxis.net

    Warning: No matches found for: phpmyadmin

    No Matches found

    [root@atvntr3009 /]# yum searchphpmyadmin

    Loaded plugins: fastestmirror, priorities

    usage: yum [options] COMMAND

    List of Commands:

    check-update Check for available package updates

    clean Remove cached data

    deplist List a package's dependencies

    downgrade downgrade a package

    erase Remove a package or packages from your system

    groupinfo Display details about a package group

    groupinstall Install the packages in a group on your system

    grouplist List available package groups

    groupremove Remove the packages in a group from your system

    help Display a helpful usage message

  • 8/3/2019 Install MySQL Database

    14/25

    info Display details about a package or group of packages

    install Install a package or packages on your system

    list List a package or groups of packages

    localinstall Install a local RPM

    makecache Generate the metadata cache

    provides Find what package provides the given value

    reinstall reinstall a package

    repolist Display the configured software repositories

    resolvedep Determine which package provides the given dependency

    search Search package details for the given string

    shell Run an interactive yum shell

    update Update a package or packages on your system

    upgrade Update packages taking obsoletes into account

    options:

    -h, --help show this help message and exit

    -t, --tolerant be tolerant of errors

    -C run entirely from cache, don't update cache

    -c [config file] config file location

    -R [minutes] maximum command wait time

    -d [debug level] debugging output level

    --showduplicates show duplicates, in repos, in list/search commands

    -e [error level] error output level

    -q, --quiet quiet operation

  • 8/3/2019 Install MySQL Database

    15/25

    -v, --verbose verbose operation

    -y answer yes for all questions

    --version show Yum version and exit

    --installroot=[path] set install root

    --enablerepo=[repo] enable one or more repositories (wildcards allowed)

    --disablerepo=[repo] disable one or more repositories (wildcards allowed)

    -x [package], --exclude=[package]

    exclude package(s) by name or glob

    --disableexcludes=[repo]

    disable exclude from main, for a repo or for

    everything

    --obsoletes enable obsoletes processing during updates

    --noplugins disable Yum plugins

    --nogpgcheck disable gpg signature checking

    --disableplugin=[plugin]

    disable plugins by name

    --enableplugin=[plugin]

    enable plugins by name

    --skip-broken skip packages with depsolving problems

    --color=COLOR control whether color is used

    --samearch-priorities

    Priority-exclude packages based on name + arch

    Plugin Options:

    [root@atvntr3009 /]# yum search phpmyadmin

  • 8/3/2019 Install MySQL Database

    16/25

    Loaded plugins: fastestmirror, priorities

    Loading mirror speeds from cached hostfile

    * base: yum.singlehop.com

    * extras: pubmirrors.reflected.net

    * updates: mirrors.serveraxis.net

    Warning: No matches found for: phpmyadmin

    No Matches found

    [root@atvntr3009 /]# cd

    [root@atvntr3009 ~]# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-

    3.noarch.rpm

    --2012-01-26 04:34:41-- http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-

    3.noarch.rpm

    Resolving download.fedora.redhat.com... 209.132.181.27, 209.132.181.23, 209.132.181.24, ...

    Connecting to download.fedora.redhat.com|209.132.181.27|:80... connected.

    HTTP request sent, awaiting response... 404 Not Found

    2012-01-26 04:34:41 ERROR 404: Not Found.

    [root@atvntr3009 ~]# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-

    3.noarch.rpm

    --2012-01-26 04:34:59-- http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-

    3.noarch.rpm

    Resolving download.fedora.redhat.com... 209.132.181.27, 209.132.181.23, 209.132.181.24, ...

    Connecting to download.fedora.redhat.com|209.132.181.27|:80... connected.

    HTTP request sent, awaiting response... 404 Not Found

    2012-01-26 04:34:59 ERROR 404: Not Found.

  • 8/3/2019 Install MySQL Database

    17/25

    [root@atvntr3009 ~]# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-

    4.noarch.rpm

    --2012-01-26 04:36:16-- http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-

    4.noarch.rpm

    Resolving download.fedora.redhat.com... 209.132.181.25, 209.132.181.26, 209.132.181.27, ...

    Connecting to download.fedora.redhat.com|209.132.181.25|:80... connected.

    HTTP request sent, awaiting response... 200 OK

    Length: 12232 (12K) [application/x-rpm]

    Saving to: epel-release-5-4.noarch.rpm'

    100%[================================================================================

    ==============================================>] 12,232 --.-K/s in 0.05s

    2012-01-26 04:36:16 (229 KB/s) - `epel-release-5-4.noarch.rpm' saved [12232/12232]

    [root@atvntr3009 ~]# wget http://rpms.famillecollet.com/el5.i386/remi-release-5-

    7.el5.remi.noarch.rpm

    --2012-01-26 04:36:40-- http://rpms.famillecollet.com/el5.i386/remi-release-5-7.el5.remi.noarch.rpm

    Resolving rpms.famillecollet.com... 88.191.74.232, 2a01:e0b:1:74:2e0:f4ff:fe1b:b827

    Connecting to rpms.famillecollet.com|88.191.74.232|:80... connected.

    HTTP request sent, awaiting response... 200 OK

    Length: 4855 (4.7K) [application/x-rpm]

    Saving to: remi-release-5-7.el5.remi.noarch.rpm'

    100%[================================================================================

    ==============================================>] 4,855 --.-K/s in 0.1s

  • 8/3/2019 Install MySQL Database

    18/25

    2012-01-26 04:36:40 (43.0 KB/s) - `remi-release-5-7.el5.remi.noarch.rpm' saved [4855/4855]

    [root@atvntr3009 ~]# ls

    epel-release-5-4.noarch.rpm remi-release-5-7.el5.remi.noarch.rpm

    Back to MySQL

    [root@atvntr3009 bin]# /usr/bin/mysql_install_db --user=mysql

    Installing MySQL system tables...

    OK

    Filling help tables...

    OK

    To start mysqld at boot time you have to copy

    support-files/mysql.server to the right place for your system

    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

    To do so, start the server, then issue the following commands:

    /usr/bin/mysqladmin -u root password 'new-password'

    /usr/bin/mysqladmin -u root -h atvntr3009 password 'new-password'

    Alternatively you can run:

    /usr/bin/mysql_secure_installation

    which will also give you the option of removing the test

    databases and anonymous user created by default. This is

  • 8/3/2019 Install MySQL Database

    19/25

    strongly recommended for production servers.

    See the manual for more instructions.

    You can start the MySQL daemon with:

    cd /usr ; /usr/bin/mysqld_safe &

    You can test the MySQL daemon with mysql-test-run.pl

    cd mysql-test ; perl mysql-test-run.pl

    Please report any problems with the /usr/bin/mysqlbug script!

    The latest information about MySQL is available on the web at

    http://www.mysql.com

    Support MySQL by buying support/licenses at http://shop.mysql.com

    [root@atvntr3009 bin]#

    6. MySQL Data directory will contain default databases as shown below.

    [root@atvntr3009 ~]# grep datadir /etc/my.cnf

    datadir=/var/lib/mysql

    [root@atvntr3009 ~]#

    Start SQL service

    [root@atvntr3009 ~]# service mysqld status

    mysqld is stopped

    [root@atvntr3009 ~]# service mysqld start

  • 8/3/2019 Install MySQL Database

    20/25

    Starting MySQL: [ OK ]

    [root@atvntr3009 ~]#

    8. Verify the db up and running

    [root@atvntr3009 ~]# /usr/bin/mysqladmin version

    /usr/bin/mysqladmin Ver 8.41 Distrib 5.0.77, for redhat-linux-gnu on x86_64

    Copyright (C) 2000-2006 MySQL AB

    This software comes with ABSOLUTELY NO WARRANTY. This is free software,

    and you are welcome to modify and redistribute it under the GPL license

    Server version 5.0.77

    Protocol version 10

    Connection Localhost via UNIX socket

    UNIX socket /var/lib/mysql/mysql.sock

    Uptime: 38 sec

    Threads: 1 Questions: 2 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second

    avg: 0.053

    [root@atvntr3009 ~]#

    [root@atvntr3009 ~]# /usr/bin/mysqlshow

    +--------------------+

    | Databases |

    +--------------------+

    | information_schema |

    | mysql |

  • 8/3/2019 Install MySQL Database

    21/25

    | test |

    +--------------------+

    [root@atvntr3009 ~]#

    [root@atvntr3009 ~]# /usr/bin/mysqlshow mysql

    Database: mysql

    +---------------------------+

    | Tables |

    +---------------------------+

    | columns_priv |

    | db |

    | func |

    | help_category |

    | help_keyword |

    | help_relation |

    | help_topic |

    | host |

    | proc |

    | procs_priv |

    | tables_priv |

    | time_zone |

    | time_zone_leap_second |

    | time_zone_name |

    | time_zone_transition |

    | time_zone_transition_type |

    | user |

  • 8/3/2019 Install MySQL Database

    22/25

    +---------------------------+

    [root@atvntr3009 ~]#

    9. make sure you are able to start and stop the service

    [root@atvntr3009 ~]# service mysqld stop

    Stopping MySQL: [ OK ]

    [root@atvntr3009 ~]#

    [root@atvntr3009 ~]# /usr/bin/mysqladmin version

    /usr/bin/mysqladmin: connect to server at 'localhost' failed

    error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'

    Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

    [root@atvntr3009 ~]#

    [root@atvntr3009 ~]# service mysqld start

    Starting MySQL: [ OK ]

    [root@atvntr3009 ~]#

  • 8/3/2019 Install MySQL Database

    23/25

    10. Change the root account passwords as shown below.[root@atvntr3009 ~]# mysql -u root

    Welcome to the MySQL monitor. Commands end with ; or \g.

    Your MySQL connection id is 2

    Server version: 5.0

    .77 Source distribution

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql>

    [root@atvntr3009 ~]# mysql -u rootWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 3

    Server version: 5.0.77 Source distribution

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> select host, user from mysql.user;

    +------------+------+| host | user |+------------+------+| 127.0.0.1 | root || atvntr3009 | |

    | atvntr3009 | root || localhost | || localhost | root |+------------+------+5 rows in set (0.00 sec)

    mysql>

    NOT ABLE TO DO CONTROL C NOW, IF I TRY TO COPY THE SQL PROMPT IS GONEHencewe have the screenshot now

  • 8/3/2019 Install MySQL Database

    24/25

  • 8/3/2019 Install MySQL Database

    25/25

    11. Verify the new password for root account

    [root@atvntr3009 ~]# mysql -u root

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    [root@atvntr3009 ~]#

    Now we have the mySQL installed and root password also changed.


Recommended