0

I was wondering if there is any way to create a new MYSQL database on my godaddy shared hosting account through a php script? I am trying to do this but I keep on getting the following error:

ERROR - 2017-10-04 12:39:50 --> Query error: Access denied for user 'athanasios'@'localhost' to database 'db_531064720577264' - Invalid query: CREATE DATABASE db_531064720577264 CHARACTER SET utf8 COLLATE utf8_general_ci

I have created a user on MYSQL named athanasios which is associated with a password. I have tried everything, but it seems like it is not possible to create a database on a godaddy server using PHP. I would really appreciate a step by step on how to create a new database on MYSQL server running on godaddy shared hosting.

Thank you,

Tommy

TomBa
  • 5
  • 5

1 Answers1

0
  1. Log in to your GoDaddy account.
  2. Click Web Hosting.
  3. Next to the hosting account you want to use, click Manage.
  4. In the Databases section of the Hosting Control Panel, click the icon corresponding to the database you want to create.
  5. Click Add.
  6. Complete the fields. To allow direct access, click Additional Options.
tadman
  • 194,930
  • 21
  • 217
  • 240
  • Hi, thanks for the response. My goal is to create databases using a php script and not through cpanel. Will your answer allow me to do this? Thanks – TomBa Oct 04 '17 at 17:17
  • Refer https://mrphp.com.au/blog/create-a-cpanel-database/ .You can schedule a Script. – nitin.sharma0180 Oct 04 '17 at 17:19
  • Alright so it seems like since I am on a shared hosting account, I cannot create a database via ssh or php script. I do not have those kind of privileges. – TomBa Oct 04 '17 at 20:21