1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice

Plesk and Databases

Discussion in 'Plesk for Windows - 8.x and Older' started by kharrazi, Sep 6, 2004.

  1. kharrazi

    kharrazi Guest

    0
     
    I couldn't find any thread which answers all of these questions together for Plesk 7.0/Win2003:

    ----- MySQL ------------------
    1. Is it possible to connect to the internal phpmyadmin which is installed within Plesk without logging into Plesk itself? Something like www.yourdomain.com:8443/phpmyadmin or so?
    (I don't want to install phpmyadmin seperately)

    2. How can I log into the builtin phpmyadmin as the administrator so I can use the admin features of phpmyadmin?

    3. How can I set the permisssions to become able to connect to the builtin mysql db in Plesk through remote interfaces like: mysql control center, mysql admin or mysql query? (both as the admin and client)
    (I know it is unsecure ...)


    ---- Built in MS SQL/MSDE ------------------------------
    The same question as MySQL:
    1. Connecting directly to the Plesk's builtin webbased SQL Enterprise manager without logging into Plesk?
    (I found mssql.yourdomain.com but clients can do everything? Even changing server roles and so on!)

    2. Connecting to the MSDE (built in MSSQL) through the available remote applications like Aqua Data Studio?
    (I just want to test the buitin MSDE and I know this wouldn't serve me as a real MS SQL server)
     
  2. kharrazi

    kharrazi Guest

    0
     
    Well, anybody anyidea???
    :confused:
     
  3. ToolmakerSteve

    ToolmakerSteve Guest

    0
     
    I had a similar problem when using MySql Maestro,
    which includes the needed SSH Tunnelling cability.

    I did:
    SSH Host Name: [my IP], SSH port: 22,
    SSH user name & password: [my server admin]
    Host Name: localhost, Port number: 3306
    MySQL user name & password: [myusername] [mypassword]

    Result:
    "Host 'localhost.localdomain' is not allowed to connect to this MySQL server."

    Searching in Google for that sentence, I found:
    http://lists.mysql.com/java/7924
    which refers to:
    http://dev.mysql.com/doc/connector/j/en/index.html#id2488240
    a similar situation, when using MySQL Connector/J
    What is similar, is the need to access via TCP/IP.

    Analysis - why my original attempt didn't work:
    "*@localhost" is handled specially (under RedHat Linux?) to make a direct Unix Socket connection - so the original "localhost | admin" user in the mysql grants table does NOT make it possible to access via TCP/IP Port.
    => What is needed, is an explicit reference to a TCP host that RedHat won't handle specially - so create the equivalent IP user
    "127.0.0.1 | admin".

    The final solution I came up with is:
    . Run putty with:
    . . HostName: [my IP], Port: 22, Protocol: SSH
    . login as: root
    # mysql -u admin -p
    mysql> use mysql;
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'127.0.0.1'
    -> IDENTIFIED BY 'mypassword' WITH GRANT OPTION;

    mysql> select * from users;
    -- this is just to see the added user:
    127.0.0.1 | admin | encryptedpassword | Y | Y ...

    Now I can run MySQL Maestro with:
    SSH Host Name: [my IP], SSH port: 22,
    SSH user name & password: [my server admin] [thatpassword]
    Host Name: 127.0.0.1, Port number: 3306
    MySQL user name & password: [myusername] [mypassword]

    Why this works:
    "127.0.0.1 | admin" now has all mysql permissions, when accessing via mysql's TCP/IP port (typically 3306).

    CAUTION: It would also have been possible to grant all privileges to 'admin'@'%',
    as was done in the original example that I found --
    but that seemed like a security risk,
    as that would [I think] allow logging in directly to MySQL from any host on the MySQL Server's network.
    I wanted to insure that all remote access could only be done via an SSH connection.
     
Loading...