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

    • 📢 ¡ATENCIÓN JUGADORES DE LINEAGE 2! 📢   ¡L2 Crest Converter ha llegado! El programa creado por PulserX para obtener crests de clan (banderas) que realmente funciona, programado y distribuido de manera gratuita a todo el mundo por su humilde servidor.   ¿Cansado de que el viejo CrestMaker falle y arruine tus imágenes en Windows 10/11? Hemos creado una solución actualizada.   ✅ Optimizado para Windows 10/11 ✅ Convierte PNG/JPG perfectamente ✅ Adiós a las imágenes cuadriculadas   L2 Crest Converter es la herramienta que garantiza que tu crest se vea tal como la diseñaste. Descárgalo y velo en acción aquí: 👉 https://youtu.be/OVsoi5Vaj7M?si=mhE8Aet0w5nwo6ZE 👉 https://youtu.be/OVsoi5Vaj7M?si=mhE8Aet0w5nwo6ZE 👉 https://youtu.be/OVsoi5Vaj7M?si=mhE8Aet0w5nwo6ZE    
    • New update! A gift coupon system has been added. Now you can activate gift coupons directly in the bot: Open "My Profile" Tap "Activate gift coupon" Enter the coupon code The balance will be topped up automatically. Received a coupon? Activate it and top up your balance. Buy Telegram Stars with maximum benefit in our bot
    • New update! A gift coupon system has been added. Now you can activate gift coupons directly in the bot: Open "My Profile" Tap "Activate gift coupon" Enter the coupon code The balance will be topped up automatically. Received a coupon? Activate it and top up your balance. Buy Telegram Stars with maximum benefit in our bot
    • New update! A gift coupon system has been added. Now you can activate gift coupons directly in the bot: Open "My Profile" Tap "Activate gift coupon" Enter the coupon code The balance will be topped up automatically. Received a coupon? Activate it and top up your balance. Buy Telegram Stars with maximum benefit in our bot
    • Dear users! We are happy to announce a major update of our bot! What’s new: Long-term number rental You can now rent virtual numbers for a long period (hours, days, or months)! This is perfect for those who need constant access to a number to receive SMS from various services. Number history A new feature allows you to view all your rented numbers in one place! You can: • See the full history of all numbers (instant and long-term) • View all received SMS codes • Return to active numbers to receive additional SMS • See the status of each number Gift coupon system You can now activate gift coupons directly in the bot! Just go to your profile and click “Activate gift coupon” — your balance will be topped up automatically! Chinese language Full support for the Chinese language has been added! The bot is now available in three languages: Russian, English, and Chinese. Switching languages has become even more convenient. Improved rental process Before purchasing a number, detailed service information is now displayed: • Service name • Ability to receive repeated SMS • Rental duration • Cost This will help you make a more informed decision before renting. Quick rental The “Virtual numbers (SMS)” button has now been renamed to “Quick rental” for greater clarity and convenience. Go to the SMS service
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock