Jump to content

Mysql Problem


smay3411

Recommended Posts

Hi All,

I am having a little trouble with my database I am using the scripts from here

https://help.tcadmin.com/Automatically_Create_a_MySQL_Database

everything works up to this point.

 

with MySqlManager() as mysql2:

mysql2.DisableReplication=True;

mysql2.Connect(String.Format("Data Source={0};Database={1};User Id= {1};Password={2};Pooling=False;", mysql_server, ThisService.Variables["MySQLUser"], ThisService.Variables["MySQLPassword"]));

mysql2.ImportDatabase(ThisService.RootDirectory + "db.sql");

 

this is the error I am getting.

Access denied for user 'db28'@'%' to database 'db'

I have tried everything to fix but no good.

cheers

SM

Link to comment
Share on other sites

Hi Guys.

I have everything works now but I can not import the .sql file

with MySqlManager() as mysql2:

mysql2.DisableReplication=True;

mysql2.Connect(String.Format("Data Source={0};Database={1};User Id= {1};Password={2};Pooling=False;", mysql_server, ThisService.Variables["MySQLUser"], ThisService.Variables["MySQLPassword"]));

mysql2.ImportDatabase(ThisService.RootDirectory + "db.sql");

 

I am using db.sql for now I have put it in the server root, after install of Dayz there is nothing in mysql (db28) table.

Does anyone know how I can fix this

cheers

SM

Link to comment
Share on other sites

Make sure the file exists. Under the ImportDatabase command add this line. Keep the spacing of the previous line.

Script.WriteToConsole(mysql2.ImportDatabase(ThisService.RootDirectory + "db.sql")

 

That should write the full path to db.sql in /home/tcadmin/Logs/Monitor/console.log. Make sure it exists. It won't fail with an error if it doesn't exist.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 12 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use