Learn about Centmin Mod LEMP Stack today
Register Now

mysqladmin_shell.sh error mysql not installed

Discussion in 'Add Ons' started by PhoenixDown, Sep 9, 2016.

  1. PhoenixDown

    PhoenixDown New Member

    11
    0
    1
    Jun 16, 2014
    Ratings:
    +0
    Local Time:
    4:56 AM
    I'm trying to use this to create a new user and database and am getting the following error, any ideas? Thanks!

    Code:
    [root@cloud tools]# chmod +x mysqladmin_shell.sh
    
    [root@cloud tools]# /root/tools/mysqladmin_shell.sh setuserdb
    
    --------------------------------------------------------------
    
    Basic MySQL Admin - create mysql user & databases 
    
    --------------------------------------------------------------
    
    --------------------------------------------------------------
    
    
     Do you want to create a new MySQL username (type = y) or 
    
     Add a new database name to existing MySQL username (type = n) ? 
    
     Enter y or n: y
    
    ---------------------------------
    
    Create MySQL username:
    
    ---------------------------------
    
     Enter new MySQL username you want to create: removed
    
     Enter new MySQL username's password: removed
    
    ---------------------------------
    
    Create MySQL database:
    
    ---------------------------------
    
     Enter new MySQL database name: amplifydb
    
    
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    
    
    Error: command was unsuccessful
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    6:56 PM
    Nginx 1.13.x
    MariaDB 5.5
    check if mysql is running and try restarting mysql server first
     
  3. PhoenixDown

    PhoenixDown New Member

    11
    0
    1
    Jun 16, 2014
    Ratings:
    +0
    Local Time:
    4:56 AM
    wasn't sure how to do that (typing mysql gives the same error) so I restarted the droplet. No luck.
     
  4. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    11:56 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    just type:

    Code:
    mysqlrestart 
    and try again after that :)
     
  5. PhoenixDown

    PhoenixDown New Member

    11
    0
    1
    Jun 16, 2014
    Ratings:
    +0
    Local Time:
    4:56 AM
    Thanks -- I wish i learned unix instead of dos. Still no go. Maybe I need to reinstall mysql/mariadb


    [root@cloud ~]# mysqlrestart

    Redirecting to /bin/systemctl restart mysql.service

    Failed to restart mysql.service: Unit mysql.service failed to load: No such file or directory.

    [root@cloud ~]#
     
  6. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    11:56 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Mysql seems to not be installed but don't try to do it by yourself as Centminmod for sure take care of it and never fail for it so i think you do something wrong...

    You may post more info on what OS do you use and how did you install Centminmod and what version?
     
  7. PhoenixDown

    PhoenixDown New Member

    11
    0
    1
    Jun 16, 2014
    Ratings:
    +0
    Local Time:
    4:56 AM
    Sure - its a fairly new digital ocean droplet using CentOS 7.2 x64 and latest and greatest download. I really have nothing on it so if its easier to delete everything and start over I can do that -- just don't want to destroy the droplet and lose my ip.
     
  8. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    11:56 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    How did you install Centminmod?
     
  9. PhoenixDown

    PhoenixDown New Member

    11
    0
    1
    Jun 16, 2014
    Ratings:
    +0
    Local Time:
    4:56 AM
    CLI - standard instructions. I am sure I screwed up something somewhere :)
     
  10. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    6:56 PM
    Nginx 1.13.x
    MariaDB 5.5
    split your posts to own thread to troubleshoot

    probably best to just do a fresh reload of centos os and re-install fresh centmin mod installation again

    should be able to keep droplet and reinstall i believe with DO

    on destroy droplet section

    upload_2016-9-9_13-11-29.png
     
    • Like Like x 1