Results 1 to 9 of 9

Thread: Error creating new user or database

  1. #1
    Join Date
    Feb 2017
    Posts
    12

    Error creating new user or database

    custombuild 1.0.29
    DirectAdmin 1.58.1
    MySQL 8.0.13

    This is a new user, but all other users with existing mysql db have the same problem, cant add new ones

    Error after try to create db:


    Error creating the database

    Details

    Unable to add user vacatures_deb. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'this is the password'' at line 1

    log gives something that might be te problem, there is a "" after vacatures :
    2019:08:25-12:35:34: createDB(vacatures_deb): unable to add user: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'this is the password'' at line 1. Query: GRANT ALL PRIVILEGES ON `vacatures\_deb`.* TO 'vacatures_vacatures'@localhost IDENTIFIED BY 'this is the password'

  2. #2
    Join Date
    Oct 2008
    Posts
    323
    Can you try increase Max lentght username on mysql?

  3. #3
    Join Date
    Feb 2017
    Posts
    12
    Quote Originally Posted by urgido View Post
    Can you try increase Max lentght username on mysql?
    if i make username like vacatures_v same problem

  4. #4
    Join Date
    Apr 2009
    Posts
    2,421
    Quote Originally Posted by fortfort View Post
    custombuild 1.0.29
    DirectAdmin 1.58.1
    MySQL 8.0.13
    Why are you running the very old and not supported Custombuild version 1.x? And even worse, you are running the old Custombuild version in combination with the very newest MySQL 8.x - I am sorry, but you can't expect that to work. Before debugging any more, you should upgrade to Custombuild 2.x

  5. #5
    Join Date
    Feb 2017
    Posts
    12
    Quote Originally Posted by ditto View Post
    Why are you running the very old and not supported Custombuild version 1.x? And even worse, you are running the old Custombuild version in combination with the very newest MySQL 8.x - I am sorry, but you can't expect that to work. Before debugging any more, you should upgrade to Custombuild 2.x
    sorry i might not be clear:

    it is plugin version 1.0.29, but it is custumbuild 2.0.0 (rev: 2148)

  6. #6
    Join Date
    Apr 2009
    Posts
    2,421
    Sorry, my mistake then (I do not use the plugin, only shell). You should be able to solve the problem by adding the following to /usr/local/directadmin/conf/directadmin.conf:

    Code:
    mysql_use_new_user_methods=1
    Remember to restart DirectAdmin after you add the code above to directadmin.conf, also remember that there should always be one empty line at the bottom of directadmin.conf

    Documentation of the feature from changelog:

    MySQL: new user methods: ALTER USER, DROP USER, etc. (SCRIPTS): https://www.directadmin.com/features.php?id=2274

    Support for MySQL 8.0: https://directadmin.com/features.php?id=2314

  7. #7
    Join Date
    Feb 2017
    Posts
    12
    Quote Originally Posted by ditto View Post
    Sorry, my mistake then (I do not use the plugin, only shell). You should be able to solve the problem by adding the following to /usr/local/directadmin/conf/directadmin.conf:

    Code:
    mysql_use_new_user_methods=1
    Remember to restart DirectAdmin after you add the code above to directadmin.conf, also remember that there should always be one empty line at the bottom of directadmin.conf

    Documentation of the feature from changelog:

    MySQL: new user methods: ALTER USER, DROP USER, etc. (SCRIPTS): https://www.directadmin.com/features.php?id=2274

    Support for MySQL 8.0: https://directadmin.com/features.php?id=2314
    Yep that worked thanks!, however i had to change te password with my root phpmyadmin account of the new account maybe i did something wrong, or the auto generated password has a flaw.

  8. #8
    Join Date
    Apr 2009
    Posts
    2,421
    I am not sure I understand you, however if I guess correct of what you are talking about, then the reason is:

    On a new user account in DirectAdmin, if your create the very first database by "log in as user", then you will not be able to login to phpMyAdmin using the same username/password as the DirectAdmin account. However, if the the very first database is created by logging into DirectAdmin with the user account username/password (not by using "log in as user"), then it will work to log into phpMyAdmin using the same username/password as the DirectAdmin account.

    This is only true for the very first database that is created in a user account. So I always avoid "log in as user" when creating the first database in the account.

  9. #9
    Join Date
    Feb 2017
    Posts
    12
    when i create a new database as a user of a domain/account, i cant login with my username and password in phpmyadmin. I guess something goes wrong with the storage of the password or the type of login.
    If i check phpmadmin with my admin login is see that te new created user has "caching sha2 authentication plugin" i have to change that to mysql authentication, and change the password. then it will work

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •