Jump to content

[Guide] How to properly secure mysql server


Recommended Posts

There are many newbies out there that do not secure their mysql server properly (if even).

By not taking security measures you may likely be hacked.

 

In this guide I will show you how to properly secure your mysql server and lower the risk of intrusion.

 

Step 1: Installing navicat

I'll be using Navicat 9.0. Its (in my opinion) the best mysql administration tool you can get.

You can download it from here.

Select non-commercial (free) version for your operating system and install it.

 

 

Step 2: Setting up navicat

Start the program.

On upper left click the hue button "Connection" -> "Mysql" -> New window will open.

 

Type in your info as shown on picture below:

1navicat.jpg

Press ok.

 

You have now created a connection to mysql server and can connect to it.

On left side you will now see your connection listed.

Doubleclick on it. It will open into a list

 

Step 3: Accessing user management

 

If you do not yet have a database then create one:

To create a database:

- right click on your connection -> select "New database". Enter name and press ok (ignore the rest).

2database.jpg

 

Select your database (mine is testdatabase). Right click on it and choose "Manage users..." -> New window will open.

 

We want to AVOID using root access at ALL cost.

It is EXTREMELY stupid to be using root account. If someone gets it's possession he will have access to ENTIRE server.

That is why root should ONLY be used at setting up server.

 

For this purpose we will create a new username called "testuser"

3users.jpg

 

 

Step 4: Creating new user

Right click on empty space under existing usernames -> press "Add user" -> New window will open.

4newuser.jpg

 

Some clarification on host entry:

 

If you enter 127.0.0.1 in host, "testuser" will only be able to connect from your pc (localhost).

NO OTHER users can connect to your mysql server.

This is the most secure option.

 

Sometimes you need to connect to mysql server through external connection (other pc).

If you have a static ip, simply enter the ip of that pc. For example. 123.123.123.123.

Once you do that, "testuser" will only be able to connect when he is using ip 123.123.123.123

Still quite secure (unless his pc gets compromised).

 

If you do not have a static ip, but still want to connect, you can use the host of your isp and match out your ip.

Example: Let's say your isp is comcast (USA internet company).

Your host will be something like: comcast.dynamic.5624462346.users.comcast.net

That part 5624462346 is unique for you, but it changes every time.

So, we want to allow comcast.%.users.comcast.net

Replace the numbers/letters you wish to ignore with %.

This is not very secure as it can allow other users to connect to your server (and bruteforce password), but it is still better than allowing everyone to connect.

 

If you wish to allow everyone to connect to your server (very, VERY bad), simply put % in hostname.

I do not suggest doing that, ever. It's stupid.

 

Some clarification on password entry:

Make sure to ALWAYS use secure passwords.

Example of a secure password is this:

54zv$%ZC"$&ubCVZV&Q$N%BV64

 

Something to think about:

A word password like "banana" can be cracked (using dictionary) in a matter of minutes.

A word password using letters and numbers like "banana1" can be crached using dictionary/bruteforce in a matter of minutes or few hours at max.

A word password using BIG/small letters and numbers can be crached using bruteforce/dictionary in a matter of hours/days.

A password using BIG/small letters, numbers and special signs can be bruteforced in:

- 4 char letter "4Kk$" -> hours

- 5 char letter "4Kk$#" -> 12+ hours

- 6 char letter "4Kk$#2" -> Few days

- 7 char letter "4Kk$#h" -> A week, give or take few days

- 8 char letter "4Kk$#hf" -> 12-16, give or take few days

- 9 char letter "4Kk$#hf4" -> Two weeks- a month

- 10 char letter and higher "4Kk$#hf4!" -> Few months

Adding any additional letters would resolve in bruteforcing of around half a year or longer.

 

Note: I normally use passwords such as "4z3v57J%BU&V%/NbV/%N(BV". Never got hacked so I can vouch it works.

 

Step 5: Giving access to user

We can either set privileges for "testuser" for entire server (mysql), for specific database (mysql ->l2java) or for specific table (mysql->l2java->users)

 

Combine them as you see them fit.

Few examples below:

If you wish to allow "testuser" to be able to read all the databases, but not create any:

Click on him from user selection -> Global privileges -> Select -> Click "Save"

This way he will have readonly access for ALL databases.

 

Allowing to read only one database (example: testdatabase):

Doubleclick on "testuser" -> Database list will open. -> Select database you wish to give him readonly access to (example: testdatabase). -> "Database specific privileges" -> Select -> Click "Save".

Voila, now he can only read data from testdatabase.

 

Allowing to read only one TABLE in one database (example: users in l2j):

Doubleclick on "testuser" -> Database list will open -> Doubleclick database you wish to give him readonly access to (example: l2j). -> Select TABLE you wish to give him readonly access (example: characters" -> Make a tick at "Select" -> Press Save.

Now he can only access TABLE users on database l2j on your mysql server.

 

You can go even FURTHER!

 

Allowing readonly in Mysql server -> Database: l2j -> Table: characters-> column char_name:

Doubleclick on "testuser" -> Database list will open -> Doubleclick database you wish to give him readonly access to (example: l2j). -> Doubleclick TABLE you wish to give him readonly access (example: characters" -> Select "char_name" -> column specific privileges -> Tick "Select" -> Save.

Doing this, "testuser" will ony have readonly access in "olumn char_name", table "characters", database "l2j" and your mysql server.

He will not be able to do ANYTHING else but read character names. He will not even see any other fields/tables/databases except character_name.

 

 

Very important!

Privileges stack!

If you give "testuser" access to read all databases, and then leave "select" empty in a table, he will still be able to see that table.

You can however give him read only access for entire database, and then write for only table "characters".

This way he will see entire database and read all data, but can only read to "characters"

 

 


This guide should help a lot of people secure their servers properly.

I have not seen it written anywhere else, but It is extremely important!!

If you find it too hard and cannot do it yourself, hire me and I'll do it .

 

 

Do NOT leech this article! Do not copy/paste it to other forum/sites without my explicit permission. Not even if you give me credits.

I do not care what the reason is. DO NOT copy, re-post or steal it! Not even parts of it.

If you want ME to post it somewhere else PM ME and I will consider it.

 

You can be damn sure I would find out if it happens and get your sorry ass punished for it.

 

If you want me to correct/add/explain something else, let me know.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   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.



  • Posts

    • You should be thankfull that he even gave u back 100, just because u cant wait, u expect full refund while that guy already almost finished, i think ave is right, i worked with him, no issues ofc delay but thats life 😁  
    • *¶¶¶+2349158681268¶¶¶ Welcome to the home of wealth and fame.*        Many have seek for wealth and it’s quiet a thing of pity +2349158681268 that some do so in wrong places which made it doubtful of the true source and it is at this juncture that i approach you with the right source of wealth which you have really seek for. ZERUZANDAH BROTHERHOOD OCCULT is an association of those that has been blessed by Lord Lucifer zeruzandah the great and have decided to educate the masses on the possible ways of acquiring the wealth, power,protection fame and every other thing you could think of without human sacrifice. Gone are the days when human blood are required for sacrifice here at zeruzandah Brotherhood, human blood sacrifice has been abolished because the money you are seeking for should be used to help and sponsor your loved ones but you have to have it at the back of your mind that there is a very great sacrifice which you must pay to pierce the heart of the spiritual world so that you can be blessed here on human Earth and that sacrifice will be according to what zeruzandah wants you to do which the Grandmaster of this temple will tell you when you’ve been in contact with him. Here at zeruzandah Brotherhood we only demand some sacrificial items and some special animal blood for sacrifice in order to please the Lord Lucifer to bless you here on Earth. If anyone from anywhere tells you that we accept anything money from you in order for you to be initiated into this Brotherhood, inform the TEMPLE GRANDMASTER +2349158681268 zeruzandah Brotherhood do not accept any money from you except you are the one to fund your sacrificial items. Contact the temple Grandmaster at +2349158681268   Spiritual grandmaster of ZERUZANDAH BROTHERHOOD +2349158681268   I WANT TO JOIN SECRET OCCULT FOR MONEY RITUALS IN NIGERIA OR GHANA TO BE RICH AND TO MAKE MONEY, WITH NO HUMAN SACRIFICE OR BLOODSHED CALL +2349158681268 FOR YOUR BUSINESS SUCCESS TO WIN ELECTIONS TO BE FAMOUS AND POWERFUL,   The ZERUZANDAH Brotherhood is a spiritual fraternal society whose aims are the cultivation of Inner Power through the study and practice of esoteric arts for the improvement of body, mind and spirit.   It unites its members in brotherhood and in the quest for wisdom, successful living and finding one’s purpose in life. It has no secret agenda .While it is a deeply spiritual organization, it promote a particular religion or belief.   The Brotherhood transmits an esoteric tradition spanning thousands of years, with a universal vision born in the East and embracing the best of the West in the quest to return to the ancient and original Tao or Source of all wisdom.   WELCOME TO ZERUZANDAH BROTHERHOOD,   The Club of the Rich and Famous; is the world oldest and largest fraternity made up of 3 Millions Members. We are one Family under one father who is the Supreme Being. In ZERUZANDAH OCCULT Brotherhood we believe that we were born in paradise and no member should struggle in this world. Hence all our new members are given Money, Wealth,Fame , Power ETC.   Fear and anxiety has drawn so many people back to unfulfilled dreams and make their quest for wealth and power shambled, it is thing of fact that money ritual Occult is not and can never be a sin because Occult is still a religion despite what ever others are thinking and zeruzandah Brotherhood is here to give life to that dead hope of acquiring your desired wealth,fame and power without human sacrifice. Contact the Spiritual Grandmaster of ZERUZANDAH Brotherhood now at +2349158681268   The wealth of this life goes to those who deserve and desire it by their decision of breaking the wicked chain of poverty. It is actually a thing of fact that poverty is real and it’s not your fault that it exists but however will be your fault and greatest mistake if you allow poverty to exist in your life because of fear. Only the brave makes the move to liberate himself from humiliating nature of poverty…   +2349158681268   You can be rich, wealthy, famous etc without human blood@ZERUZANDAH BROTHERHOOD contact the Spiritual Grandmaster now +2349158681268   The desire to remove the garment of poverty rest on your shoulder and I will advise you do so now by being an initiated member of zeruzandah Brotherhood.   For enquires, contact the Spiritual Grandmaster now@ +2349158681268   The men of the world can only see within the limit of the eye and the things of the spirit are meant for the spirit to see. You can never be that wealthy,rich and famous without controlling the Spiritual wealth and fame that Lucifer the Great Spiritual father offers to those who are humble to him. You have been admiring the wealthy people around you and wish to be so wealthy or more than they do but you are yet to discover the Secret of WEALTH. There so many things known by the rich and the wealthy which the poor don’t know and don’t want to know because of their unnecessary fear. The secret to what you seek is to join a secret occult society.   Call now for enquiries +2349158681268.
    • *¶¶¶+2349158681268¶¶¶ Welcome to the home of wealth and fame.*        Many have seek for wealth and it’s quiet a thing of pity +2349158681268 that some do so in wrong places which made it doubtful of the true source and it is at this juncture that i approach you with the right source of wealth which you have really seek for. ZERUZANDAH BROTHERHOOD OCCULT is an association of those that has been blessed by Lord Lucifer zeruzandah the great and have decided to educate the masses on the possible ways of acquiring the wealth, power,protection fame and every other thing you could think of without human sacrifice. Gone are the days when human blood are required for sacrifice here at zeruzandah Brotherhood, human blood sacrifice has been abolished because the money you are seeking for should be used to help and sponsor your loved ones but you have to have it at the back of your mind that there is a very great sacrifice which you must pay to pierce the heart of the spiritual world so that you can be blessed here on human Earth and that sacrifice will be according to what zeruzandah wants you to do which the Grandmaster of this temple will tell you when you’ve been in contact with him. Here at zeruzandah Brotherhood we only demand some sacrificial items and some special animal blood for sacrifice in order to please the Lord Lucifer to bless you here on Earth. If anyone from anywhere tells you that we accept anything money from you in order for you to be initiated into this Brotherhood, inform the TEMPLE GRANDMASTER +2349158681268 zeruzandah Brotherhood do not accept any money from you except you are the one to fund your sacrificial items. Contact the temple Grandmaster at +2349158681268   Spiritual grandmaster of ZERUZANDAH BROTHERHOOD +2349158681268   I WANT TO JOIN SECRET OCCULT FOR MONEY RITUALS IN NIGERIA OR GHANA TO BE RICH AND TO MAKE MONEY, WITH NO HUMAN SACRIFICE OR BLOODSHED CALL +2349158681268 FOR YOUR BUSINESS SUCCESS TO WIN ELECTIONS TO BE FAMOUS AND POWERFUL,   The ZERUZANDAH Brotherhood is a spiritual fraternal society whose aims are the cultivation of Inner Power through the study and practice of esoteric arts for the improvement of body, mind and spirit.   It unites its members in brotherhood and in the quest for wisdom, successful living and finding one’s purpose in life. It has no secret agenda .While it is a deeply spiritual organization, it promote a particular religion or belief.   The Brotherhood transmits an esoteric tradition spanning thousands of years, with a universal vision born in the East and embracing the best of the West in the quest to return to the ancient and original Tao or Source of all wisdom.   WELCOME TO ZERUZANDAH BROTHERHOOD,   The Club of the Rich and Famous; is the world oldest and largest fraternity made up of 3 Millions Members. We are one Family under one father who is the Supreme Being. In ZERUZANDAH OCCULT Brotherhood we believe that we were born in paradise and no member should struggle in this world. Hence all our new members are given Money, Wealth,Fame , Power ETC.   Fear and anxiety has drawn so many people back to unfulfilled dreams and make their quest for wealth and power shambled, it is thing of fact that money ritual Occult is not and can never be a sin because Occult is still a religion despite what ever others are thinking and zeruzandah Brotherhood is here to give life to that dead hope of acquiring your desired wealth,fame and power without human sacrifice. Contact the Spiritual Grandmaster of ZERUZANDAH Brotherhood now at +2349158681268   The wealth of this life goes to those who deserve and desire it by their decision of breaking the wicked chain of poverty. It is actually a thing of fact that poverty is real and it’s not your fault that it exists but however will be your fault and greatest mistake if you allow poverty to exist in your life because of fear. Only the brave makes the move to liberate himself from humiliating nature of poverty…   +2349158681268   You can be rich, wealthy, famous etc without human blood@ZERUZANDAH BROTHERHOOD contact the Spiritual Grandmaster now +2349158681268   The desire to remove the garment of poverty rest on your shoulder and I will advise you do so now by being an initiated member of zeruzandah Brotherhood.   For enquires, contact the Spiritual Grandmaster now@ +2349158681268   The men of the world can only see within the limit of the eye and the things of the spirit are meant for the spirit to see. You can never be that wealthy,rich and famous without controlling the Spiritual wealth and fame that Lucifer the Great Spiritual father offers to those who are humble to him. You have been admiring the wealthy people around you and wish to be so wealthy or more than they do but you are yet to discover the Secret of WEALTH. There so many things known by the rich and the wealthy which the poor don’t know and don’t want to know because of their unnecessary fear. The secret to what you seek is to join a secret occult society.   Call now for enquiries +2349158681268.
    • Hi, i sell adventurer 77 with some 78 skills, 2 subs done and last sub 60 lvl   perma vip, red cloak, pirate hat and vitallity pots safe email, i use MM Pufa add my discord  _flamber
    • the video was created well before the 70% refund. it doesn't require you to have a degree to understand
  • Topics

×
×
  • Create New...