1. MySQL 1 - Installation and basic concepts

    Install

    The installation of MySQL is straighforward on debian-like systems. Just type:

    sudo aptitude install mysql-server mysql-client -y
    

    In the installation process you'll be asked to set up the password for the admin user. Remember this password because you'll need it in a moment. One thing, though, this username must NOT be used by your applications because it has ALL privileges possible, and you don't want your application to have the right to drop other databases installed in the same MySQL. Limited users must be created for ...


  2. MySQL my.cnf file

    Quick entry. If you are usually connecting to a local or remote mysql database you have to enter the password every single time you enter "mysql". Of course there is a way to configure it in a way that the password is not required:

    Let's doit for the root user.

    $ sudo -i
    
    $ cat > .my.cnf << EOF
    
    [client]  
    user = root  
    password = qweqweqwe  
    host = localhost
    
    EOF
    
    $ chmod 600 .my.cnf
    
    1. The first command is for having root privileges.
    2. The second command creates a file called .my.cnf (it MUST be this ...

Page 1 / 1