За последние 24 часа нас посетил 51381 программист и 1758 роботов. Сейчас ищут 692 программиста ...

как правильно выполнить команду

Тема в разделе "MySQL", создана пользователем Extremist, 20 авг 2009.

  1. Extremist

    Extremist Активный пользователь

    С нами с:
    18 авг 2009
    Сообщения:
    52
    Симпатии:
    0
    Адрес:
    Новосибирск
    подскажите как правильно прописать
    GRANT ALL ON hlstats.* TO 'root'@'localhost' IDENTIFIED BY 'password';

    и

    INSERT INTO hlstats_Options (keyname, value)

    VALUES ('scripturl', '/hlstats/hlstats.php');

    интересует какой кнопкой ставиться символ => ' чтобы мускуль не выдавал ошибку 1064 (42000) и говорил почитайте мануал по синтаксису(

    и хотелось бы уточнить hlstats_Options - это название таблицы или какая-то переменная?
     
  2. Extremist

    Extremist Активный пользователь

    С нами с:
    18 авг 2009
    Сообщения:
    52
    Симпатии:
    0
    Адрес:
    Новосибирск
    про символ разобрался уже вот только остался вопрос

    в руководстве написано
    Open up a console window (Start -> Run -> cmd.exe)


    Change to the C:\hlstats\ folder


    Execute the following in the console window mysqladmin create hlstats to create the database
    NOTE: If your root account has a password you'll have to add this to all of the MySQL command lines --user=root --password=rootpassword


    Create the HLstats tables using the following command mysql hlstats < hlstats.sql


    Install support for your desired Half-Life mod with the following command mysql hlstats < gamesupport_???.sql
    NOTE: Replace the ??? with the name of the mod. (ex. gamesupport_cstrike.sql)


    Create a MySQL account for HLstats to use by doing the following:

    NOTE: You can replace the username statsguy and the password ilovehlstats with anything you want


    C:\hlstats>mysql --user=root mysql
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 5 to server version: 4.0.12-nt
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> GRANT ALL ON hlstats.* TO 'statsguy'@'localhost' IDENTIFIED BY 'ilovehlstats';
    Query OK, 1 rows affected (0.06 sec)

    mysql> quit
    Bye



    In order to setup HLstats to work with Perl correctly, you will need to do the following:

    NOTE: You will need to replace hlstats/hlstats.php with the location of the hlstats.php relative to your webroot. If your hlstats.php is located at www.myclan.com/hlstats/hlstats.php then you would need to enter /hlstats/hlstats.php below.


    C:\hlstats>mysql --user=root hlstats
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 5 to server version: 4.0.12-nt

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> INSERT INTO hlstats_Options (keyname, value) VALUES ('scripturl', '/hlstats/hlstats.php');
    Query OK, 1 rows affected (0.06 sec)

    mysql> quit
    Bye

    я правильно понял, что все команды мускуля нужно выполнять находясь в каталоге c:\hlstats ???
    просто я пробывал выполнить cmd mysql - винда меня отправила сказав что это не является внутренней или внешней командой...так как тогда выполнить строку, находясь в каталоге C:\hlstats\
    Create the HLstats tables using the following command mysql hlstats < hlstats.sql ?????
    объясните пошагово, плз не совсем понял должен ли мускуль запускаться прям с командной тсроки, т.е. пуск = выполнить = cmd = mysql или это только в каталоге mysql\bin можно сделать? как тогда выполнить строчку выше?

    сори за ламерские вопросы..просто никакой конкретики в гайдах нет..а сам я что-то не догоняю(((