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

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


  • Posts

    • Migrating a legacy Interlude server to PostgreSQL while adding real observability is basically forcing 2006 MMO engineering to attend a 2026 infrastructure conference at gunpoint. PS: which revision of aCis? PS: 🧻what was broken during this whatever you call it.    AAC Guard beign asked to adapt to this be like: - Creating bugs since early 2018
    • OH MY LORDDDDDDDDDDDDDDDDDDDDD   FINALLY
    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • I came out of my cave as I do once every 5 years. By now, I know nobody really cares about L2, but I still find it fun to experiment. Everything you see here will be free and open source. I have no interest in selling anything.   Long story short, I like to revisit Interlude and apply what I've learned to see how far I can push it. Here's Outerlude, a public fork of aCis for the modern age.   Video demo:   Work that has been done:   Redone the netcode from scratch to be async The NPC AI was completely redone based on Finite State Machines Moved to PostgreSQL and using some of its cool features Lots of config that should be hot reloadable has moved to the database OpenTelemetry instrumentation, where it makes sense, and a Grafana dashboard A built-in REST API for server management A built-in MCP Server for LLMs Nidrah AI, an AI Agent to make managing the server easier Real-time server map view Chat auditing and live snooping A new Fake Players Engine with a Node logic system and a new LLM planner for any behavior Just watch the video   If there is interest in this and I'm happy with it, or I get bored (which I always do), I will open-source it. Let me know what you think and if there is some feature you'd like me to implement.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..