View Full Version : Creating MySQL Databases without cPanel
walkingkeyboard
04-08-2007, 05:07 PM
Is this possible? Do do anything, it seems like you have to create a user, and before they can do anything, it must be assigned to an existing database. Is there a way around this?
Rephrased: My ultimate goal is to be able to create databases and tables from a client like MySQL Query Browser. I got it working fine (I whitelisted my ip and everything) but can't create databases with it.
Basil
04-08-2007, 07:57 PM
That's an interesting point, I too tried to connect to my MySQL database with the query browser, and it connected and let me log in, but I couldn't see any of the existing tables.
walkingkeyboard
04-09-2007, 03:26 PM
I am able to view the existing database information_schema and its tables (as well as use SELECT queries successfully), but I am unable to create/edit/delete anything.
Access denied for user 'my_usrname'@'myip' to database 'db_i_tried_to_create'
Pethens
04-09-2007, 04:15 PM
I always thought that database creation was restricted to the cPanel function so that Bluehost could keep track of how many databases you have created.
But there's nothing to prevent you from creating one master database and then sharing it between several projects by using table prefixes.
It's been awhile, but if I am not mistaken you can use PHPMyAdmin to set up a database. I believe that you can also do it directly through the MySQL server through SSH though I have not tried that on bluehost.
cratercraver
06-12-2007, 01:39 PM
....
My ultimate goal is to be able to create databases and tables from a client like MySQL Query Browser. I got it working fine (I whitelisted my ip and everything) but can't create databases with it.
Hi Walkingkeyboard,
I just tried to connect to my HostMonster account using MySQL Query Browser but it wouldn't connect. It is possible that I had the wrong entries for:
Server hostname:
Port:
Username:
Password:
Default schema:
As an example, if my public WWW site name for my account were www.MyWebsite.com, my cpanel username/password were respectively "cpuser"/"cppass", my database username/password were "dbuser"/"dbpass", and my MySQL database name were "cpuser_mydb", then what would the proper entries be?
My guess was...
Server hostname: MyWebsite.com
Port: 3306
Username: dbuser
Password: dbpass
Default schema: cpuser_mydb
But, it won't connect with these entries. Anyone have this working??
Databases can only be created using cPanel (phpMyAdmin cannot). Databases can only be created by the root user in Bluehost's cPanel setup.
areidmtm
06-12-2007, 03:18 PM
You could however, create a script (such as PHP) that would login to cpanel and then create it for you...
charlesgan
06-12-2007, 08:22 PM
Is this possible? Do do anything, it seems like you have to create a user, and before they can do anything, it must be assigned to an existing database. Is there a way around this?
Rephrased: My ultimate goal is to be able to create databases and tables from a client like MySQL Query Browser. I got it working fine (I whitelisted my ip and everything) but can't create databases with it.
try this code
CREATE DATABASE `youraccount_dbname` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `youraccount_dbuser`;
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.