Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Mar 2006
    Posts
    14

    Default Mysql add database

    Via a backend script or command line, how do I add a database for a domain and a mysql user with proper access to that database?

    Thanks

  2. #2
    Member sawbuck's Avatar
    Join Date
    Jan 2004
    Posts
    1,313
    cPanel/Enkompass Access Level

    Root Administrator

  3. #3
    Member
    Join Date
    Mar 2006
    Posts
    14

    Default

    Thanks sawbuck, If I add a database for the user autotest and I set the database name to autotest_testdb will it show up in their cpanel config? That is what I need it to do.

    Thanks

  4. #4
    Member
    Join Date
    Mar 2006
    Posts
    14

    Default

    OK, that does work however adding a user to that database does not work when it comes to cpanel.

  5. #5
    Member
    Join Date
    Mar 2006
    Posts
    14

    Default

    I've done some searching on google and have found plenty of ways to add mysql users however they do not display properly in cpanel. Does anyone have any slight idea on how to add a database user via a backend script without going through the cpanel gui?

  6. #6
    Member
    Join Date
    Mar 2006
    Posts
    14

    Default

    Does anyone have any idea?

  7. #7
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Just curious here. Why not use cPanel for this?

  8. #8
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Have you tried /scripts/mysqladduserdb?

  9. #9
    Member
    Join Date
    Jan 2005
    Posts
    139

    Default

    Quote Originally Posted by VipGeek
    I've done some searching on google and have found plenty of ways to add mysql users however they do not display properly in cpanel. Does anyone have any slight idea on how to add a database user via a backend script without going through the cpanel gui?
    What way do you want to do it? You can do it in ssh, and yeah I have a web "remote" way of doing it. The web way will make a database &/or user and give user rights to the database. But that would be much unsecured to have a remote system to add a database using the web

  10. #10
    Member
    Join Date
    Mar 2006
    Posts
    14

    Default

    I want to be able to do it with a script, Add a database (I can easily do that) Then add a user to that database, I do not want to go into cpanel for that. I want to automate it completely.

Similar Threads & Tags
Similar threads

  1. MySQL: add user to database
    By Kurieuo in forum cPanel Developers
    Replies: 7
    Last Post: 08-14-2010, 06:50 AM
  2. postwwwacct Add user to MySQL Database
    By cfidecaro in forum cPanel Developers
    Replies: 2
    Last Post: 04-04-2009, 03:32 PM
  3. Can't add mysql database - doesnt show
    By jeroman8 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-08-2005, 12:43 PM
  4. Mysql add database problem.
    By vucsht in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-16-2004, 11:21 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube