Jump to content
  • 0

MYSQL PORT CHANGE


Question

Posted

Hi,

IM trying to change the port that connects trow mysql and navicat, and i succefuly did it.

But when i try to start Loginserver.bat and gameserver.bat they give me a error saying there isnt a connection trow java to mysql.

 

Could anyone help me solve this problem?

 

The only missing thing is connect the new port from login/gameserver.bat to mysql/navicat.

 

Notes:

L2j Rev 7571 EP

I search the forum and there isnt a tutorial about this.....(Could anyone do it,very hellpful)

4 answers to this question

Recommended Posts

  • 0
Posted

so you installed backup the back into navicat ? ? ?

check  your server.properties

# Database Driver

 

Driver = com.mysql.jdbc.Driver
# Databese URL
DataBeseUrl = jdbc:mysql://localhost/your database name
# Databese User name
Login = root
# The Mighty password
Password = your mysql password

  • 0
Posted

make sure you have right confings

 

# ---------------------------------------------------------------------------

# Database

# ---------------------------------------------------------------------------

# Specify the appropriate driver and url for the database you're using.

# Examples:

# Driver = com.mysql.jdbc.Driver (default)

# Driver = org.hsqldb.jdbcDriver

# Driver = com.microsoft.sqlserver.jdbc.SQLServerDriver

Driver = com.mysql.jdbc.Driver

# Database URL

# URL = jdbc:mysql://localhost/l2jdb (default)

# URL = jdbc:hsqldb:hsql://localhost/l2jdb

# URL = jdbc:sqlserver://localhost/database = l2jdb/user = sa/password =

URL = jdbc:mysql://localhost/l2jdb (host name:localhost,db name: l2jdb)

# Database user info (default is "root" but it's not recommended)

Login = root

# Database connection password

Password = (put your db pass,if you dont have let it blank)

 

# Default: 100

MaximumDbConnections = 100

 

# Default: 0

MaximumDbIdleTime = 0

 

 

  • 0
Posted

so you installed backup the back into navicat ? ? ?

check  your server.properties

# Database Driver

 

Driver = com.mysql.jdbc.Driver
# Databese URL
DataBeseUrl = jdbc:mysql://localhost/your database name
# Databese User name
Login = root
# The Mighty password
Password = your mysql password

 

Thanks so much i figurid it out googling,

thanks for your fast replys

 

The fix is:

URL = jdbc:mysql://localhost/l2jdb

Instead of localhost

URL = jdbc:mysql://yourip:mysqlport/l2jdb

Example: URL = jdbc:mysql://174.120.165.10:3778/l2jdb

  • 0
Posted

Full fix for the Port edit is: (Someone might need this)

Go to Mysql Comand line Client and use this to create a username

 

CREATE USER 'Your Username'@'%' IDENTIFIED BY 'Your Password';

GRANT ALL PRIVILEGES ON *.* TO 'Your Username'@'%'  WITH GRANT OPTION;

 

CREATE USER 'Your Username'@'localhost' IDENTIFIED BY 'Your Password';

GRANT ALL PRIVILEGES ON *.* TO 'Your Username'@'%'  WITH GRANT OPTION;

 

Example:

Go to Mysql Comand line Client and use this to create a username

CREATE USER 'Dreamsonline'@'%' IDENTIFIED BY '12345';

GRANT ALL PRIVILEGES ON *.* TO 'Dreamsonline'@'%'  WITH GRANT OPTION;

 

CREATE USER 'dreamsonline'@'localhost' IDENTIFIED BY '12345';

GRANT ALL PRIVILEGES ON *.* TO 'Dreamsonline'@'%'  WITH GRANT OPTION;

This is to create a new Username in Mysql

 

You can drop username root

DROP USER 'root'@'%';

 

Reconfigure your mysql password to the password you defined in comand line.

 

Go to my.ini and change port number

Usually C:\Program Files\MySQL\MySQL Server 5.1\my.ini

# CLIENT SECTION

# ----------------------------------------------------------------------

port=3306 <----- Edit this port to the one you want

 

# SERVER SECTION

# ----------------------------------------------------------------------

# The TCP/IP Port the MySQL Server will listen on

port=3306  <----- Edit this port to the one you want

 

We are finished with Mysql

 

Now lets go to database ; for example i use Navicat

New Conection

Conection properties: fill in your information that you created in mysql comand line and port number that you edited in my.ini

 

OK now the finall part

Go to Server.properties and login.properties and change this line:

URL = jdbc:mysql://localhost/l2jdb

Change to

URL = jdbc:mysql://localhost:port ip/l2jdb

Example:

URL = jdbc:mysql://192.168.1.2:6877 /l2jdb

The 192.168.1.2 is your internal IP

The :6877 is the mysql port of server/login will listen to

 

 

Ok this might be helpfull for others,

Good luck have fun

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...