[Bukkit guide] MySQL

Discussion in 'Bukkit Help' started by zipron, Dec 18, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    red_froggy32

    When the installation reaches the creating of service the installation freezes. What should i do? thanks in advance
     
  2. Offline

    zipron

    have you already installed some MySQL service? (MySQL server, wamp, xampp,..) try to remove all stuff before installing. I had the same problem a loooong time ago, think I fixed it that way.

    zip
     
  3. Offline

    red_froggy32

    I have no MySQL service this is going to be the first time im using MySQL.
     
  4. Offline

    zipron

    Hmm.. than I'm afraid you should google it, except if you're doing something wrong, there might be an issue with your computer settings or something
     
  5. Offline

    red_froggy32

    umm.. ok thanks
     
  6. Offline

    hairymexican69

    i am having issues with finding all the commands for mysql. trying to load localhost/mysqladmin and i get errors

    Error

    MySQL said: [​IMG]
    #1045 - Access denied for user 'root'@'localhost' (using password: NO)
    phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server
    not sure where i am going wrong.
     
  7. Offline

    zipron

    you have to make sure that you configure things right:
    - do you use the right username (root in your case)
    - you haven't configured a password, did you make a password while isntalling your MySQL server?
    - do you host your MySQL server on the same machine your minecraft server is hosted? otherwise "localhost" is a pretty wrong IP adress =p

    I do advice not to use the root account though, make a new account with a new password. The configuration is probably found in the plugin config file. Read this guide very carefully, everything I said is actually in it..

    zip
     
  8. Offline

    hairymexican69

    i sure did read this post over and over and over, and as one of the other members on this forum i went to free sql page and got the info from there.

    i did the CREATE USER bukkit IDENTIFIED BY 'password1'; and put hairymexican in place of bukkit and changed my password and placed ('secretpass';) as you did with my own.

    then i did GRANT ALL ON *.* TO bukkit@'127.0.0.1';

    then all i saw was
    mysql> GRANT ALL ON *.* TO bukkit@'127.0.0.1';
    Query OK, 0 rows affected (0.00 sec)

    no output was mentioned but i got the point.
    did /help and read \q would shut mysql down and i did such and restarted.
    then i was lost. i opened alot of config files and coudln't find anything.
    maybe i missed a step.
    Hairymexican69
     
  9. Offline

    zipron

    The config file I'm talking about are the config files of the plugins which use MySQL: all of them need to know which user and password to use to connect to the database. So run your server and stop it, which should make all plugins creating their config files. Go into the config file per plugin and change the settings as you configured them when installing your MySQL server.

    zip
     
  10. Offline

    hawkfalcon

    Will the Linux instructions work on Mac?
     
  11. Offline

    zipron

    it should yes, these are mysql commands, not OS commands =)
     
  12. Offline

    andrewpo

    Your Linux shell/bash commands don't apply to all distributions and you should make this clear.

    "sudo apt-get install..." would work on distributions like Debian and Ubuntu
    However, for distributions like CentOS you would need to use "sudo yum install..."

    And anyone who wants to use MySQL on a mac (easy way without much/any complicated config) should get "MAMP" and connect to 'localhost' or '127.0.0.1' with username 'root' and password 'root' [Or they can add their own mysql user with restricted privileges and use that if they are technically competent].

    (Oh and there are a few typos in your initial post)
     
    hawkfalcon likes this.
  13. Offline

    zipron

    Ok thanks for pointing out the difference between the linux distributions, I forgot that =) However, I don't agree using root account, with a remote connection, you cannot even use it, mysql blocks all connections from outside using the root account, so if you want remote access, you'll have to make another account anyways =)

    zip
     
  14. Offline

    andrewpo

    Yes, I do know how MySQL works - my suggestion was for inexperienced users who wanted an easy way to set up a database on a mac computer, and I doubt inexperienced users will be delving into the realms of remote connections.
     
  15. Offline

    zipron

    if you have a server, you'll need remote access :p but you do have a point
     
    andrewpo likes this.
  16. Offline

    MAMA_KINO

    I got a probleme :mad: thats making me mad

    when i do the
    Code:
    CREATE USER bukkit IDENTIFIED BY "blah";



    it works and says
    Code:
    Query OK, 0 rows affected <0.00 sec>
    then when i do the
    Code:
    GRANT ALL ON *.* TO bukkit@'127.0.0.1';
    it says
    Code:
    Can't find any matching row in user table
    help me please!

    (sorry for possible overuse of code i havent really used these fourms much)
     
  17. Offline

    cray_Z

    Aww...
     
  18. Offline

    zipron

    please open your mysql console
    Code:
    mysql -u root -p
    and execute following statement & query:
    Code:
    USE mysql
    to select the mysql database
    Code:
    SELECT host, user FROM user;
    to print a list of all users, please copy-paste it here?

    Only installation is different on mac btw, the mysql commandline is exactly the same =)

    Zip
     
  19. Offline

    MAMA_KINO

    nvm i seem to have got it to work just on a website

    thanks!
     
  20. Offline

    rosedragon

    On my box,
    GRANT ALL ON *.* TO bukkit@'127.0.0.1'; doesn't work
    while
    GRANT ALL ON *.* TO bukkit; does work.

    I read around the internet and found out a tutorial that says you supposed to put the ip on the username creation.
     
  21. Offline

    zipron

    That's not true, MySQL permission works with username and ip adress, that's what makes it extra safe. But maybe you don't have MySQL but another SQL server installed? or not the correct permissions on your host?
     
  22. Offline

    rosedragon

    That is odd, I instal it just like your guide. Except that considering you dont describe what shall I install on install, I just install everything. Not sure about permissions, my server is on a VPN, I access it through teamviewer.

    Although yeah something seems wrong, tried to hook iconomy to mysql by typing the username and password, it keep saying database not found.
     
  23. Offline

    zipron

    I'm afraid you do have a permission issue:
    - download & isntall Heidi SQL (http://www.heidisql.com/download.php)
    - log in to your MySQL server, should be straigth forward
    - check if your minecraft database shows up in the left column of heidi SQL, if not you don't have permissions =(

    if you cannot grant permissions, ask your server host if he can do it for you =)

    zip
     
  24. Offline

    rosedragon

    I see. Thank you, I will check it.
     
  25. Offline

    rosedragon

    Hi,

    I want to update my situation.. apparently maybe we use different versions but I can get it to work by typing the ip when creating. So the command I use is like:
    mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';I got this command from mysql reference manual. Now I got PEX creating it database.

    Still thanks a lot for your guide zipron, at least it makes me know that setuping databases for minecraft is not complicated ^_^.
     
  26. Offline

    zipron

    Ok good =) It ofcourse depends on how your server is set up from time to time, you'll have to do things different =) glad it works now =)
     
  27. Offline

    tanveergt5

    can i use the same db for 2 plugins hawkeye and ultraban?
     
  28. Offline

    zipron

    Yes, this is the MySQL structure:
    - server (with an IP)
    - database (where users have certain privileges)
    - tables

    Multiple plugins will create their own tables on the same database. You don't have to worry about these tables, plugins using MySQL create them theirselve =)

    zip
     
    tanveergt5 likes this.
  29. Offline

    tanveergt5

    Im looking for help with filling in details with Ultrabans mysql info
    #Change to MySQL for mysql support#
    #Change to SQLite for sqlite support#
    Database: mysql??
    mysql-database: 'what goes here??'
    mysql-user: 'username'
    mysql-password: 'themysqlpass

    can you help me??
     
  30. Offline

    zipron

    Database means the type of database server, if you've followed this guide, it is MySQL, other examples are PostgrSQL and Oracle.

    mysql-database is the database for your server, this could be named "minecraft" or "bukkit" or whatever you want, you can easily create one with these commands:
    Code:
    zipron@zipronServer > mysql -u root -p
    mysql > CREATE DATABASE IF NOT EXISTS `minecraft`;
    Query OK, 1 row affected
    mysql > GRANT ALL ON minecraft.* TO bukkit@'127.0.0.1';
    Query OK, 0 rows affected (0.00 sec)
    
    Remember that you can use one database for all your plugins! they only need different tables. Also, mind the `` quotes when creating a database in stead of ' '.

    Next one is your user, probably bukkit, but if you created an other users while following the guide, feel free to use that one (say you like your name more than "bukkit" =P)

    the password is the password given for your user. (probably bukkit as said before).

    If you're not sure about users, passwords and privileges, all about that is found in the guide at the start of this topic.
    good luck and feel free to ask more =)
    zip
     
Thread Status:
Not open for further replies.

Share This Page