Join the community today
Register Now

mysqladmin_shell.sh Create database using "-" or "_' doesn't work

Discussion in 'Add Ons' started by pamamolf, Jan 4, 2017.

  1. pamamolf

    pamamolf Well-Known Member

    2,754
    245
    63
    May 31, 2014
    Ratings:
    +436
    Local Time:
    12:54 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Please fill in any relevant information that applies to you:
    • Centmin Mod Version Installed:123.09beta01
    • Nginx Version Installed:1.11.8
    • PHP Version Installed:7.0.14
    • MariaDB MySQL Version Installed:10.1.20
    • When was last time updated Centmin Mod code base ? : A few minutes....
    Hello :)

    Using :

    Code:
    /usr/local/src/centminmod/addons/mysqladmin_shell.sh setuserdb
    I was not able to create a database name with "-" or "_' inside like my-database :(

    Didn't keep the exact error bu it was very clear that the problem is the special character :(

    Any ideas?

    Thanks
     
  2. pamamolf

    pamamolf Well-Known Member

    2,754
    245
    63
    May 31, 2014
    Ratings:
    +436
    Local Time:
    12:54 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Also the user doesn't seem to exist checking from Phpmyadmin :(

    Is not at the list of users at all...

    Don't know if something change and mysqladmin needs some adjustments ......

    And i try to create the user from Phpmyadmin i am getting this error:

    Code:
    An account already exists with the same username but possibly a different hostname.
    PS: Creating a database and a user from Phpmyadmin and all working great now :)

    It seems that there was an issue with mysqladmin script :(
     
    Last edited: Jan 4, 2017
  3. eva2000

    eva2000 Administrator Staff Member

    30,546
    6,849
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,262
    Local Time:
    8:54 AM
    Nginx 1.13.x
    MariaDB 5.5
    indeed !
    Code (Text):
    ./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: newmysqluser1
     Enter new MySQL username's password: newmysqlpass1
    ---------------------------------
    Create MySQL database:
    ---------------------------------
     Enter new MySQL database name: my-database
    
    ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-database' at line 1
    
    Error: command was unsuccessful
    

    will check it out
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,546
    6,849
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,262
    Local Time:
    8:54 AM
    Nginx 1.13.x
    MariaDB 5.5