mysql.sock wo ?? wie ???



  • Hi, ich probiere gerade einen webserver auf ein Linux System aufzusetzten, http, php läuft mittlerweile .. aber bei mysql hab ich so meine probs... irgendwie gibts die datei mysql.sock nicht 😕

    habe mal aus spass probiert mysql in die console einzugeben :

    rw4:~ # mysql
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    😕

    per durchsuchungsbefehl findet der die auch net 😕

    was kann man machen ?



  • rw4:~ # mysql_setpermission
    Password for user to connect to MySQL:
    Can't make a connection to the mysql server.
    The error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/bin/mysql_setpermission line 65, <STDIN> line 1.

    😞 wo bekomme ich die datei her ??



  • Der Server muss laufen und das Verzeichnis muss Schreibrechte haben für den Mysql Benutzer, damit die Datei erstellt werden kann. Welches Verzeichnis das ist, hängt davon ab, wie du MySQL installiert hast (ob von Source, RPM...)



  • rw4:~ # /etc/init.d/mysql start
    Starting service MySQL done

    rw4:~ # /etc/init.d/mysql start
    Starting service MySQL done

    rw4:~ # mysql_setpermission
    Password for user to connect to MySQL:
    Can't make a connection to the mysql server.
    The error: Access denied for user: 'root@localhost' (Using password: YES) at /usr/bin/mysql_setpermission line 65, <STDIN> line 1.

    mysql_setpermission - Z64 -- Z66 :
    # make the connection to MySQL
    dbh=DBI>connect("DBI:mysql:mysql:host=dbh=DBI->connect("DBI:mysql:mysql:host=hostname:port=opt_port:mysql_socket=opt\_port:mysql\_socket=opt_socket",opt_user,opt\_user,opt_password, {PrintError => 0}) ||
    die("Can't make a connection to the mysql server.\n The error: $DBI::errstr");



  • das erste hieß natürlich das :

    rw4:~ # rcmysql start
    Starting service MySQL done



  • Mysql läuft auch, nur ich kann halt keine Zugangsberechtigung (also user/pwd) einrichten .... :

    rw4:~ # ps -ef |grep -i mysql
    root 1128 1 0 21:48 pts/1 00:00:00 /bin/sh /usr/bin/safe_mysqld --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --socket=/var/lib/mysql/mysql.sock --datadir=/var/lib/mysql
    mysql 1161 1128 0 21:48 pts/1 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-locking
    mysql 1163 1161 0 21:48 pts/1 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-locking
    mysql 1164 1163 0 21:48 pts/1 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-locking
    root 1347 1 30 22:04 ? 00:00:14 kdeinit: konqueror -mimetype text/html http://lists.phpcenter.de/pipermail/mysql/2001-March/000156.html
    root 1350 1105 0 22:04 pts/1 00:00:00 grep -i mysql
    rw4:~ # mysql
    mysql mysqlbug
    mysql_convert_table_format mysqlcheck
    mysql_find_rows mysqld
    mysql_fix_privilege_tables mysqld_multi
    mysql_install_db mysqldump
    mysql_setpermission mysqlhotcopy
    mysql_zap mysqlimport
    mysqlaccess mysqlshow
    mysqladmin mysqltest
    mysqlbinlog



  • noch mehr infos 😕
    (also der 2te befehl ist natürlich mit 2tabs dahinter...)

    also ich habe jetzt mit google folgends gefuden :

    "SuSE führt Dich in die Irre, das root-Passwort bei mysql ist
    nämlich gar nicht gesetzt. Dummerweise heißt auch noch der
    mysql-DBA auch root (das ist aber nicht root auf Deinem System!).
    [...]
    ##Dann schnappst Du Dir irgendeinen normalen User und gibst auf
    der shell ein: mysql -u root und Du wirst von mysql begrüßt.
    Jetzt hast Du einen account, mit dem Du Dir Deine user anlegen
    kannst."

    klar 0 problemo :

    ranus@rw4:~> mysql -u root
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 23 to server version: 3.23.48-log

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

    mysql> adduser
    -> mysql_setpermission
    -> echo test
    -> WARUM MACHT DER HIER NICHTS
    -> wie macht man das ? 😞
    ->

    usw. .. 😕



  • OKi, und weiter gehts, was das letzte ist, weiß ich mittlerweile auch, nur noch nciht, wie ich einen User anlegen kann mit password, der alle rechte auf mysql hat, datenbank anlegen, tabelle anlegen usw.

    wie geht das ??

    Danke schonmal für eure Hilfe

    Mfg Martin 🙂



  • YEAAH ihc habs geschaft 😉

    oki, nur wie ist das auf nem normalen webserver mit den rechten ?
    wollte gerade ein board installieren und der konnte nichts anzeigen bis ich eigentlich alles auf ausführbar oder lesbar gemacht habe ?

    wie ist das da -- alles direkt lesbar oder ausführbar oder nur die verzeichnise usw. ?? 😉

    mfg Martin

    man: test


Anmelden zum Antworten