Jump to content
  • 0

服务端启动问题请帮帮我


cy123888

Question

3 answers to this question

Recommended Posts

  • 0
 

By default when you run the MySQL server install it only creates an account named root with the password you put in during the install process. To make a new user first log in to the database using the root account. You can do that on the machine directly with MySQL command line or with any database software like HeidiSQL etc. Run this query:

DROP DATABASE TEST;

^ should always do that on new MySQL installs first for security

 

Then to make a new account:

GRANT ALL PRIVILEGES ON dayz_epoch.* TO user@'localhost' IDENTIFIED BY "pw";

Replace user and pw with the credentials you want. Note the above will only grant permission to the dayz_epoch database for the specified user connecting locally.

 

If you need to edit the database from an external IP you should set up some sort of encryption. Either HTTPS or connect with SSH first and then use the local login you just created. Or you can make a read only account like so:

GRANT SELECT ON dayz_epoch.* TO 'user'@'%' IDENTIFIED BY "pw";

By default MySQL sends all data over the network in plain text including the username and password. That is why you need SSH or similar encryption if you plan to edit the database remotely. For SSH you will have to set up an SSH server first. Then use an SSH client to tunnel. Here is a guide for that:

http://realprogrammers.com/how_to/set_up_an_ssh_tunnel_with_putty.html

 

If you have encryption set up using a different method you can create an account that can login from anywhere with edit permissions. This is not recommended. You should limit it to connecting from only your IP:

GRANT ALL PRIVILEGES ON dayz_epoch.* TO user@'%' IDENTIFIED BY "pw";

Replace % with your IP address you will be using to connect.

 

Lastly edit your HiveExt.ini with the new user name and password you made.

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...