Mysql Monitoring

Mysql monitoring using java with JMX
Thanks in Advance
Edited by: Siva ms on Jul 6, 2009 10:52 PM

Here are some steps that should help you setup monitoring for MySQL 5.0. You probably have the MySQL ODBC driver already installed, but I'll post the complete instructions for anyone else who may need them:
1. Download and install the MySQL Connector / ODBC 3.51 Windows installer from http://dev.mysql.com/downloads/connector/odbc/3.51.html
2. Start -> Programs -> Administrative Tools -> Data Sources -> System DSN -> Add
3. Select the MySQL ODBC 3.51 Driver and click Next.
4. Enter a unique Data Source Name (which you will need in a minute) and then provide Server, User, Password, and Database information. Click Test to verify the connection, then OK.
5. Back in e-Load -> Manage -> Systems -> Monitored Systems.
6. Select the system you wish to monitor and select Edit -> Data Sources -> Database. Select the Sun JDBC driver.
7. Then, in the System DSN box, enter the unique data source name you created in step 4. Click OK.
8. An easy way to test this is to go into ServerStats -> Metrics and create a new database metric with a simple query that returns a numeric value (e.g. "select count(*) from some_table". Change the report type to "Read Result Set" and test it against the system you want to monitor.
-Matt

Similar Messages

  • MySQL - how can I change an IP address restriction for a user [solved]

    I'm getting "Host ... is not allowed to connect to this MySQL server" when attempting to connect to mysql.  I read this guide which gives a solution but I have no idea how to physically implement the solution.
    You can fix this by setting up an account for the combination of client host name and user name that you are using when trying to connect.
    I want to change the access from "localhost" to any address on my LAN (192.168.0.*) for user facade, but am unsure of the proper syntax.
    # mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 53
    Server version: 5.5.16-log Source distribution
    Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql> select host, user from mysql.user;
    +-----------+--------+
    | host | user |
    +-----------+--------+
    | 127.0.0.1 | root |
    | ::1 | root |
    | localhost | facade |
    | localhost | root |
    +-----------+--------+
    4 rows in set (0.00 sec)
    Last edited by graysky (2011-10-18 23:37:54)

    Host can be a combination of IP/netmask. In your case, something like:
    UPDATE mysql.user SET host = '192.168.0.0/255.255.255.0' WHERE user = 'facade'

  • [solved] akonadi does not have mysql db

    Hi,
    I noticed that my akonadi logs keeps telling me that
    091022  8:55:18 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
    091022  8:55:18 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
    I connected to the askonadi mysqld socket and looked at the db's. it didnot have a mysql db.
    jithine ~ $ mysql -S /home/jithine/.local/share/akonadi/db_misc/mysql.socket -u jithine
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 11
    Server version: 5.1.39-log Source distribution
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    | akonadi |
    +--------------------+
    2 rows in set (0.00 sec)
    mysql> Bye
    jithine ~ $ mysql -S /home/jithine/.local/share/akonadi/db_misc/mysql.socket -u root
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 12
    Server version: 5.1.39-log Source distribution
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    | akonadi |
    +--------------------+
    2 rows in set (0.00 sec)
    mysql>
    Has anyone noticed this. How is it working w/o mysql database.
    In the .local/share/akonadi/mysql.conf I can see that the settings have been repeated 3 times
    Last edited by jithin1987 (2009-12-09 00:06:41)

    I also get the same error message. Did you find any solution?
    Edit: Solved
    http://forum.kde.org/viewtopic.php?f=20&t=83092
    mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/
    Last edited by axel (2009-12-08 22:16:03)

  • Entering data into a mySQL database for use with my JDBC program

    does any know what i type on telnet to get mySQL to work on windows 2000?
    i read check your isp for what to type in for this line, but i use IIS
    www24:mywww/devshed# mysql -u devshed -p
    and what do i put for
    login: devshed
    Password: ********
    it says check with isp on that one too
    i am trying to insert records, and make columns, is there an easier way to do this?
    thanks,
    Pearl
    Beginning MySQL Tutorial
    By W.J. Gilmore
    April 03, 1999
    Part 1: At First Glance
    MySQL is most commonly entered through telnet. (A nice Telnet program, Easyterm, can be found at http://www.arachnoid.com) Once the telnet connection to the web server has been accomplished, a second command provides access to the MySQL server. The procedure to make these connection is as follows:
    1. Connect to telnet. This involves the insertion of the given ISP username and password.
    --------------------------------------------------------------------------------login: devshed
    Password: ********
    Last login: Wed Aug 12 09:49:14 from 195.103.124.222
    Copyright 1992, 1993, 1994, 1995, 1996 Berkeley Software Design, Inc.
    Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
    The Regents of the University of California. All rights reserved.
    BSDI BSD/OS 2.1 Kernel #12: Mon Feb 23 13:46:27 EST 1998
    You have new mail.
    www24:mywww/devshed#
    2. Connect to MySQL. This involves the insertion of the username and password given specifically for MySQL use. This information has probably been provided to you at your request to the ISP provider.
    --------------------------------------------------------------------------------www24:mywww/devshed# mysql -u devshed -p--------------------------------------------------------------------------------
    Syntax: mysql -h hostname -u username -p[password]
    Or
    mysql -h hostname -u username --password=password
    The user will then be prompted for a password, as prompted by -p.
    --------------------------------------------------------------------------------Enter password: *******--------------------------------------------------------------------------------
    Assuming MySQL has been correctly installed and configured, the user will see output similiar to the following:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 49 to server version: 3.21.23-beta-log
    Type 'help' for help.
    mysql>
    (Note: If an error message pertaining to "Access denied" is the result of connection attempts, you should consult the MySQL documentation included with the software, the MySQL mailing list found at http://www.mysql.com, as well as your ISP provider. These resources will aid greatly in resolving these problems.)
    Once connected to the database, we are free to execute the various commands of the MySQL language. However before we are able to modify the database, we must first connect to it, via the command:
    --------------------------------------------------------------------------------mysql> use devshed;
    Result:
    --------------------------------------------------------------------------------Database changed
    Mysql>
    You now are connected to the database. Note that the command was followed by a semi-colon (;). Almost all commands in MySQL are followed by a semi-colon.
    At the disposition are a number of administrative commands. These commands can be viewed simply by typing help, \h or ? at the command line:
    --------------------------------------------------------------------------------mysql> help
    help (\h) Display this text
    ? (\h) Synonym for `help'
    clear (\c) Clear command
    connect (\r) Reconnect to the server. Optional arguments are db and host
    edit (\e) Edit command with $EDITOR
    exit (\) Exit mysql. Same as quit
    go (\g) Send command to mysql server
    print (\p) print current command
    quit (\q) Quit mysql
    rehash (\#) Rebuild completion hash
    status (\s) Get status information from the server
    use (\u) Use another database. Takes database name as argument
    Connection id: 49 (Can be used with mysqladmin kill)
    mysql>

    Let's make this simple:
    a) Your book seems to assume you're doing development remotely.
    b) You are not doing development remotely.
    c) Therefore, you shouldn't follow every step listed in your book (i.e. ignore the stuff about Telnet).
    Assuming you installed mySQL in the standard location, you can use this batch file to start mySQL on your machine:
    @echo on
    cd c:\mysql\bin
    mysqld
    @echo off
    cls
    Use this batch file to shut down mySQL:
    @echo on
    cd c:\mysql\bin
    mysqladmin shutdown
    @echo off
    cls
    You can play around without a login or password in development. For a production environment, you're going to need to set up users and grant permissions.
    Spend some time reading the mySQL documentation.

  • JDeveloper/MySql: 'access denied'

    I'm trying to develop a web application using JDeveloper/MySql...
    My 'try-out' servlet ends here:
    conn = DriverManager.getConnection("jdbc:mysql://localhost/eyes?user=me&password=pwd");
    saying
    "Access denied for user 'me'@'localhost.localdomain' (using password: YES) 11045 228000"
    user me has been granted 'all' and the database eyes is accessible via the commandline.
    Any help is appreciated!

    This is MySQL issue not JDeveloper.
    Anyway this problem usually occurs when:
    1. there is not localhost or hostname in "user" table (mysql).
    So check whether user table contains two rows for user, one row for "localhost" and the second row for hostname or single row where "%" (any host) is in hostname column.
    Example:
    mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1810 to server version: 4.1.5-gamma-standard
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql> \u mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    Database changed
    mysql> select * from user where user = 'test2';
    | Host      | User  | Password         | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections |
    | localhost | test2 | 35a7d8163f9d93b2 | Y           | Y           | Y           | Y           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                |          |            |             |              |             0 |           0 |               0 |
    | machinename  | test2 | 35a7d8163f9d93b2 | Y           | Y           | Y           | Y           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                |          |            |             |              |             0 |           0 |               0 |
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------2. common mistake is when user is created and privileges granted and administrator didn't flush hosts and privileges.
    So login as root and execute "flush hosts" and "flush privileges" commands.
    Example:
    mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1812 to server version: 4.1.5-gamma-standard
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql> flush hosts;
    Query OK, 0 rows affected (0.00 sec)
    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

  • MySQL socket problems after system update

    I have been using my new Mac Mini Snow Leopard server as Squeezebox Server for over a month wihtout problems. After a system update this weekend I started to get MySQL socket errors after reboot.
    Started; log sequence number 0 43655
    091213 17:10:04 [ERROR] Can't start server : Bind on unix socket: Invalid argument
    091213 17:10:04 [ERROR] Do you already have another mysqld server running on socket: /Users/admin/Library/Caches/Squeezebox/squeezebox-mysql.sock ?
    091213 17:10:04 [ERROR] Aborting
    Although I have posted this issue to the Squeezebox forum (http://forums.slimdevices.com/showthread.php?t=72510) where it primarily belongs to I wanted to hear if anyone maybe had an idea what recent changes in Apple updates could cause this? Maybe someone else has similar MySQL problems with other installations? I am a bit desperate by now so any idea or hint is appreciated.

    Here was my solution/workaround for this issue to the rest of us poor fellas that have too fight around with Squeezebox server from time to time:
    I setup SBS to use the the standard MySQL installation on Mac OS X SL Server since I could get it to run without problems from Server Admin. Here are the instruction from the SBS Wiki:
    http://wiki.slimdevices.com/index.php/ExistingMySQLInstance
    However, I had to deviate a bit from that in order to make it work since it seems a bit outdated.
    First deviation was necessary for the MySQL access privileges. Notice the extra grant to slimserver@localhost. Don't ask me why but this worked. I do also not know whether both grants would be necessary because I haven't tried it. Feel free to improve it:
    # mysql -u admin_user -p
    Enter password: admin_password
    Welcome to the MySQL monitor.
    Commands end with ; or \g.
    Your MySQL connection id is 103 to server version: 5.0.24a-log
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql> create database slimserver;
    Query OK, 1 row affected (0.22 sec)
    mysql> grant all on slimserver.* to slimserver identified by 'slimserver_password';
    Query OK, 0 rows affected (0.13 sec)
    mysql> grant all on slimserver.* to slimserver@localhost identified by 'slimserver_password';
    Query OK, 0 rows affected (0.13 sec)
    mysql> flush privileges;
    Query OK,
    mysql> quit
    There were also slight differences necessary in the preferences setup because MySQL socket location was different from the standard one. Here are my db entries ~/Library/Application Support/Squeezebox/server.prefs:
    dbpassword: slimserver_password
    dbsource: dbi:mysql:database=slimserver;mysql_socket=/var/mysql/mysql.sock
    dbusername: slimserver
    Notice the extra mysql_socket configuration.

  • Php/mysql: can't write to mysql database [SOLVED]

    I'm writing a login script using php and mysql. I got it to work on my server about a week ago, and then I set up apache, php and mysql on my netbook so that I could take my code with me and test it. Now it doesn't work. My registration script doesn't write to the mysql database but has no errors. Here is register.php:
    <?php
    define("DB_SERVER", "localhost");
    define("DB_USER", "root");
    define("DB_PASS", "swordfish");
    define("DB_NAME", "users");
    define("TBL_USERS", "users");
    $connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
    mysql_select_db(DB_NAME, $connection) or die(mysql_error());
    function addUser($username, $password)
    global $connection;
    $password = md5($password);
    echo("adding $username,$password<br />");
    $q = "INSERT INTO " . TBL_USERS . " VALUES ('$username', '$password')";
    echo("query: $q<br />");
    $result = mysql_query($q, $connection);
    echo("$result<br />");
    if (isset($_POST["reg"]))
    addUser($_POST["username"], $_POST["password"]);
    echo("<a href='index.php'>click here to login</a>");
    ?>
    <html>
    <head>
    <title>Register</title>
    </head>
    <body>
    <form method="Post" name="login">
    <input type="text", name="username" /> Username<br />
    <input type="text", name="password" /> Password<br />
    <input type="submit" name="reg", value="Register" />
    </form>
    </body>
    </html>
    and here is the output (without the form):
    adding lexion,6f1ed002ab5595859014ebf0951522d9
    query: INSERT INTO users VALUES ('lexion', '6f1ed002ab5595859014ebf0951522d9')
    Also, I tried manually adding the content to the database:
    $ mysql -p -u root
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 9
    Server version 5.1.42 Source distribution
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql> users
    -> INSERT INTO users VALUES('lexion', 'foo')
    -> ^D
    -> Bye
    I would assume that I got something wrong with the last bit, but the php script seems like it should work. Does anybody know why it doesn't?
    Last edited by Lexion (2010-01-10 19:04:15)

    What is wrong with your PHP? Why do you think it is failing? An INSERT query doesn't return anything. Also, it's a good idea to specify which fields you are inserting into, unless you want to have to provide something for every field (tedious for tables with many fields with default values). eg:
    $q = "INSERT INTO `" . TBL_USERS . "`(`username`, `password`) VALUES ('$username', '$password')";
    As for your experiment with the mysql prompt; queries have to end with a semicolon. PHP is nice and hides that little detail from you.
    edit: Also, you're echoing text out before the HTML starts. That won't produce valid HTML. I also noticed a few other things which I corrected; look at my comments:
    <?php
    define("DB_SERVER", "localhost");
    define("DB_USER", "root");
    define("DB_PASS", "swordfish");
    define("DB_NAME", "users");
    define("TBL_USERS", "users");
    $connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
    mysql_select_db(DB_NAME, $connection) or die(mysql_error());
    function addUser($username, $password)
    global $connection;
    $password = md5($password);
    // echo("adding $username,$password<br />"); - Don't echo stuff before HTML starts.
    // Also, clean up user-supplied data before plugging it into a query unless you want to be vulnerable to SQL injection.
    $cleanusername = mysql_real_escape_string($username, $connection);
    $cleanpassword = mysql_real_escape_string($password, $connection); // Obviously you'd generally use some hashing algorithm like md5 or sha1 for passwords
    $q = "INSERT INTO `" . TBL_USERS . "`(`username`, `password`) VALUES ('{$cleanusername}', '{$cleanpassword}')"; // The backticks tell MySQL not to interpret any text within as a keyword (good for field names, eg a field called `date`. The curly brackets tell PHP that the stuff within refers to a variable; it's nice as PHP knows exactly what the variable name is with no possible ambiguity.
    // echo("query: $q<br />");
    $result = mysql_query($q, $connection);
    // echo("$result<br />"); - This won't do anything; in addition to INSERT queries not returning anything, the $result variable doesn't contain the results of the query, it's a pointer to them for use with mysql_result().
    ?>
    <html>
    <head>
    <title>Register</title>
    </head>
    <body>
    <?php
    if (isset($_POST["reg"]))
    addUser($_POST["username"], $_POST["password"]);
    echo("<a href='index.php'>click here to login</a>");
    ?>
    <form method="Post" name="login">
    <input type="text" name="username" /> Username<br />
    <input type="text" name="password" /> Password<br />
    <input type="submit" name="reg" value="Register" />
    </form>
    </body>
    </html>
    <?php
    mysql_close($connection); // Not strictly needed, as PHP will tidy up for you if you forget.
    ?>
    Last edited by Barrucadu (2010-01-10 17:34:20)

  • Mysql error / install problems

    after following the wiki entry: LAMP
    I get error:
    $ mysql
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    I'm out of luck here, does anyone have suggestions for where to look?
    .murkus

    How do you try to connect? Seems root is not allowed to connect from host "localhost" without the passwd..
    This fails:
    mysql -u root
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    But this does well:
    mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 2 to server version: 4.1.14
    Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
    mysql>

  • How to conncet mysql database and oracle database 11g2 on linux 5.4

    Hi,
    Can anyone help me to connect mysql server database to Oracle
    database on Linux OS?
    I have done all things, but I am getting a problem in installing dg4odbc
    driver on Oracle database. In a simple word, I don't know how to create
    listener between mysql database and Oracle database.
    If anyone knows that please help me in configuring dg4odbc for Oracle. OS
    -Linux 5.4 and refer any doc or link.
    oracle 11g2 11.2.0.1
    i follow the metalink id - 466228.1 ( but cant successed).
    Thanks and regards,
    pritesh ranjan

    hi pl z clear me it is required to install manully the dg4odbc driver for oracle to connect MySQL server database. because in my $ORACLE_HOME/hs/admin/initdg4odbc.ora is present automatically.
    details of the initdg4odbc.ora
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    HS_FDS_CONNECT_INFO = mysql_odbc
    HS_FDS_TRACE_LEVEL = off
    HS_FDS_SHAREABLE_NAME = /usr/lib/libmyodbc5w.so
    # ODBC specific environment variables
    set ODBCINI=/etc/odbc.ini
    set LD_LIBRARY_PATH=/usr/lib
    # Environment variables required for the non-Oracle system
    #set HOME=/home/oracle
    ~
    ~
    ~
    "initdg4odbc.ora" 20L, 437C
    details of the listener.ora file
    DG4ODBC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA=(SID=dg4odbc))
    (HS=OK)
    SID_LIST_ORCL =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = orcl)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = ORCL)
    ADR_BASE_DG4ODBC = /u01/app/oracle
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = pritesh11gprim.oracle.com)(PORT = 1521))
    ADR_BASE_ORCL = /u01/app/oracle
    "listener.ora" [readonly] 37L, 779C 35,0-1 85%
    details of tnsname.ora file
    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.132)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = ORCL)
    DG4ODBC =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
    (CONNECT_DATA=(SID=DG4ODBC))
    (HS=OK)
    MYSQL =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
    (CONNECT_DATA=(SID=MYSQL))
    (HS=OK)
    when i m going to start the listener it could not be started..
    details of the mysql server database
    [root@pritesh11gprim ~]# mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 2
    Server version: 5.6.10 MySQL Community Server (GPL)
    Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql>
    mysql> show databases;
    | Database |
    | information_schema |
    | demo |
    | mysql |
    | performance_schema |
    | pritesh |
    | test |
    6 rows in set (0.01 sec)
    if any where i m wrong then plz suggest me......
    thanks & regards
    pritesh ranjan

  • MySQL 5.0.45

    After finally getting PHP to work with the help of Charles Minow, I'm stuck on integrating MySQL 5.0.45 with PHP. I had 5.0.45 installed on the OS and it was running fine from the terminal, but could not seem to connect via php. I started fiddling around with the mysql.sock file and creating a new /var/mysql directory for it (possible that I cleared the mysql.sock file and it is blank now, doesn't seem to view in pico or view) and now when trying to initialize mysql from terminal I get:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
    The two areas that I have seem on forum links were the mysql.sock file and php.ini as things I may need to fiddle with.
    I'm going to try and reinstall again and then go from there.
    Any thoughts?
    Thanks,
    Greg

    Hi--
    It sounds like MySQL is running. I suspect your problem is with the location of the socket. When you log into the MySQL monitor program, run this SQL command and post back with the results:
    show variables like '%sock%';
    That'll tell you where MySQL is putting the socket that PHP needs. Once you find it, you'll want to add that to the php.ini file. The default is in /var/mysql/, but for some reason, I have it in the old /tmp location. By putting it there, I had to change both PHP and MySQL, I think.
    Unfortunately, though I just put MySQL on this MacBook Pro a month ago, I've already forgotten why I did it that way (other than I know I was in a big hurry to get it running), rather than try to make the new default location work. And I just checked two other Macs (running older versions of MySQL) I can get access to and I see I set them up the same way.
    One hint might be, though, that there's no mysql directory in /var, so that may be why it's not starting up. This KnowledgeBase article has information on the two ways to fix it. Perhaps I'll mess with it a bit, too, and see if I can put the socket into the more secure location (/var/msyql/mysql.sock) and see what happens..
    To stop and restart MySQL by the way, it's somewhat easier if you installed the startup item. Then you can stop it and start it with these commands:
    sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
    sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
    charlie

  • Beginner - setting up MySQL on OS X Server 10.5.4

    I would like to know what I need to do so if I run the program "MySQL Administrator" on my OS X 10.5 server or run it from another mac on my network - how I can get it to connect to my OS X 10.5 MySQL server.
    I did the normal first steps:
    Opened the Server Admin application
    Selected the server I wanedt to configure from the list pane on the left
    Clicked "Add Service"
    Foundd "MySQL" in the list and checked the box
    Clicked "Save"
    Checked "Allow network connections"
    Clicked "Set MySQL Root Password" (and made it the same password as I log into the machine with).
    Entered the password twice
    Clicked "OK"
    Clicked the "Start MySQL" button
    I assume if I run MySQL Administrator on the OS X 10.5.4 Server, I can use this info:
    Server Hostname: localhost
    Username: root
    Password [the password I used] above
    But if I try that with MySQL administrator, I can't log on.
    I did try typing:
    $ mysql -u root -p
    And I got this:
    Welcome to the MySQL Monitor. Commands end with ; or \g
    Your mySQL connection id is 14
    Server versoin: 5.0.45-log Source Distribution
    Thanks

    I got things to work. I forgot in MySQL administrator to put:
    "Connect using socket" option as /var/mysql/mysql.sock

  • Password MySQL (Tiger 10.4)

    I have a few questions.
    1). When I try to log into MySQL (sudo /Library/StartupItems/MySQLCOM/MySQLCOM start)
    UNIX asks for a password. The Problem is that I have not created a password, or should I have?
    All I did was download a package, mysql-5.0.51a-osx10.4-powerpc.dmg, from the website: http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51a-osx10.4-powerpc.dmg/f rom/pick
    I double clicked on the icons and installed the applications.
    2) I was able to connect to MySQL Server after by typing /usr/local/mysql/bin/mysql. I receive this:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 9
    Server version: 5.0.51a MySQL Community Server (GPL)
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    But it appears that I have limited access.
    Should I create a password? Was one created?
    Thoughts?
    Best,
    J

    If your speaking of Resetting the original administrator account password, bottom of this page...
    http://docs.info.apple.com/article.html?artnum=106156

  • Unable to start extract for Mysql DB on windows

    Hi,
    I have installed Mysql database on windows machine, also installed GoldenGate
    and i have edited the my.cnf (C:\Program Files\MySQL\MySQL Server 5.5) file with below entries,
    log-bin="C:\Program Files\MySQL\MySQL Server 5.5\test-bin.log"
    max_binlog_size=4096
    binlog_format=row
    and restarted the mysql service then add the mgr prm and created extract process.
    while trying to connect the mysql db from ggsci getting below error message
    GGSCI (PC) 29> dblogin sourcedb test, userid root
    Password:
    2012-12-04 15:05:04 WARNING OGG-00769 MySQL Login failed: . SQL error (2003).
    Can't connect to MySQL server on 'localhost' (10061).
    ERROR: Failed to connect to MySQL database engine for HOST localhost, DATABASE t
    est, USER root, PORT 3306.
    also Unable to start the extract process
    edit params exta
    extract exta
    dboptions host localhost, connectionport 3306
    sourcedb test, userid root, password *****
    exttrail E:\ogg_mysql\dirdat\ea
    table test.*;
    tried with exact hostname and localhost also but no luck.
    but i can able to connect the mysql through command prompt
    C:\Users\>mysql -u root test -p
    Enter password: ******
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 2
    Server version: 5.5.28-log MySQL Community Server (GPL)
    Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql>
    Edited by: 899920 on Dec 4, 2012 1:44 AM

    Hi ...
    Please check if the mysql_home variable is ok:
    MYSQL_HOME=<MySQL bin location>
    To locate the configuration file, Extract checks the MYSQL_HOME environment variable: If MYSQL_HOME is set, Extract uses the configuration file in the specified directory. If MYSQL_HOME is not set, Extract queries the information_schema.global_variables table to determine the MySQL installation directory.
    More details: http://docs.oracle.com/cd/E35209_01/doc.1121/e27289.pdf
    Try it and put here your experiences.

  • Why my MySQL JDBC Connect fail??

    Dear friends:
    I have following code:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class JdbcExample2 {
      public static void main(String args[]) {
        Connection con = null;
        try {
          Class.forName("com.mysql.jdbc.Driver").newInstance();
          //jdbc:mysql://host_name:port/dbname
    //     con = DriverManager.getConnection("jdbc:MySQL:///test","admin", "admin");
          con = DriverManager.getConnection("jdbc:MySQL://localhost:3306/test","admin", "admin");
          if(!con.isClosed())
            System.out.println("Successfully connected to " +
              "MySQL server using TCP/IP...");
        } catch(Exception e) {
          System.err.println("Exception: " + e.getMessage());
        } finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
    }But when I run , I got following error:
    Exception: com.mysql.jdbc.Driver
    My question is:
    [1]. when I connect to MySQL Server through mySQL Client, I got
    Enter password: *****
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 18 to server version: 4.1.21-community-nt
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql>
    how Can I determine MySQL Server name?? I forgot when I install, maybe MySQL is my SQL Server name
    [2]. Do I need to creat a user DSN name or System DSN name for MySQL Server?? which one is best??
    How to do it??
    [3]. How to make above simple JDBC program runnable??
    Thanks
    sunny
    Message was edited by:
    sunnymanman

    Thanks, see new errors:
    C:\Project\java>java Jdbc11
    Copyright 2004, R.G.Baldwin
    java.sql.SQLException: Access denied for user 'admin'@'localhost' (using password: YES)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:868)
    at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3340)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1238)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2743)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at Jdbc11.main(Jdbc11.java:23)
    C:\Project\java>
    any idea??
    here Jdbc11.java:23 is:
    Connection con = DriverManager.getConnection(
    url,"admin", "YES");
    my userID/Password = admin/admin;
    sunny
    Message was edited by:
    sunnymanman

  • Why Can't I Open PHP Files on My New Mac?

    I can open them fine in Firefox or Explorer on both my PC and my iMac, but on my new Mac G5 it prompts me to save the file.
    Most disturbing...

    Well, needless to say, it dodn't work.
    Lone and behold, I do not have a httpd.conf file anywhere on my mac.
    AND
    On top of it all, I hardly understand what anyone is telling me or why they're telling me it. I understand step by step, and this is where it drives me nuts because I DO follow step by step directions and they don't work!
    Then people tell me to download all this software... They might as well recall Apache or OS 10 because if step by step directions can't be executed... Well, then it's not very good software.
    FROM MACROMEDIA HELP FILES
    Setup for Sample PHP Site
    Macromedia Dreamweaver MX 2004 comes with sample PHP pages to let you build a small web application. This chapter describes one way to set up the sample application using Microsoft Internet Information Server (IIS) or Personal Web Server (PWS). For more information on these web servers, see Installing a Web Server. If you're using a different web server, see "Setting Up a Web Application" in Using Dreamweaver Help.
    If you're a Macintosh user, you can either connect to a remote PHP server or develop PHP sites locally using the Apache web server and PHP application server installed with your operating system. For setup information, see the following websites:
    • developer.apple.com/internet/macosx/php.html
    • www.entropy.ch/software/macosx/
    Setting up a web application is a three-step process. First, configure your system. Second, define a Dreamweaver site. Third, connect the application to your database. This setup guide follows this three-step process.
    Configuring your system (PHP)
    You must configure your system before you can run PHP pages on it. Specifically, you must make sure a web server and a PHP application server are installed and running on your system, then you must create a root folder for your PHP files.
    Configuring your Macintosh system (PHP)
    If you're a Macintosh user, you can run PHP pages on your computer using the Apache web server and PHP application server installed with your operating system. Configuring your system consists of making sure the web server and PHP application server are working, then creating a root folder for your PHP files.
    Testing the PHP installation (Macintosh)
    You can test the Apache web server and PHP application server on your Macintosh by running a test page.
    However, before you can use the web server to serve PHP pages and content from MySQL databases, you must configure the server to work with PHP and MySQL. For information on this process, see www.macromedia.com/devnet/mx/dreamweaver/articles/php_macintosh.html.
    To test the Apache web server and PHP application server:
    1. Configure the server as described in the article on the Macromedia website.
    2. In Dreamweaver or any text editor, create a plain text file and name it timetest.php.
    3. In the file, enter the following code:
    4. This page was created at
    5. <?php echo date("h:i:s a", time()); ?>
    6. on the computer running PHP.
    7. This code displays the time the page was processed on the server.
    8. Copy the file to the /Users/yourusername/Sites folder on your Macintosh.
    9. This Sites folder is your personal root folder for the Apache web server.
    10. In your web browser, enter the following URL and press Return:
    11. http://localhost/~yourusername/timetest.php
    The test page should open and display a time of day.
    The specified time is known as dynamic content because it changes every time you request the page. Click your browser's Refresh button to generate a new page with a different time.
    Note: Looking at the source code (View > View Source in Safari) will confirm that the page does not use any client-side JavaScript to achieve this effect.
    If the page doesn't work as expected, check for the following possible errors:
    • The file does not have a .php extension.
    • The URL contains a typing mistake. Check for errors and make sure the filename is not followed by a slash, such as http://localhost/~yourusername/timetest.php/. Also make sure you included the tilde (~) before your user name.
    • The page code contains a typing mistake.
    • The Apache server is not running. Look in System Preferences, in the Sharing category, to see whether Personal Web Sharing is enabled.
    After testing and testing the server software, create a root folder for your web application. (See Creating a root folder (Macintosh).)
    Creating a root folder (Macintosh)
    After the server software is installed, create a root folder for your web application on the Macintosh.
    To create a root folder for your web application:
    • Create a folder called MySampleApp in the /Users/yourusername/Sites folder.
    • Apache will process any page in this folder or in any of its subfolders in response to an HTTP request from a web browser.
    After configuring your system, you must define a Dreamweaver site. (See Defining a Dreamweaver site (PHP).)
    Defining a Dreamweaver site (PHP)
    After configuring your system, copy the sample files to a local folder and define a Dreamweaver site to manage the files.
    Note: If you're a Macromedia HomeSite or ColdFusion Studio user, you may find it useful to think of a Dreamweaver site as being like a HomeSite or Studio project.
    Copying the sample files
    If you haven't already done so, copy the sample files from the Dreamweaver application folder to a folder on your hard disk.
    To copy the sample files:
    1. Create a new folder called Sites-Local in your user folder on your hard disk.
    2. For example, create one of the following folders:
    • C:\Documents and Setting\yourusername\My Documents\Sites-Local (Windows)
    • /Users/yourusername/Documents/Sites-Local (Macintosh).
    3. Note: On the Macintosh, there's a folder called Sites already in your user folder. Don't use that Sites folder as your local folder; the Sites folder is where you place your pages to make them publicly accessible when you're using the Macintosh as a web server.
    4. Locate the GettingStarted folder in the Dreamweaver application folder on your hard disk.
    5. If you installed Dreamweaver to its default location, the path to the folder is as follows:
    • C:\Program Files\Macromedia\Dreamweaver MX 2004\Samples\GettingStarted\ (Windows)
    • /Applications/Macromedia Dreamweaver MX 2004/Samples/GettingStarted (Macintosh)
    6. Copy the GettingStarted folder into the Sites-Local folder.
    After copying the GettingStarted folder, define the folder as a Dreamweaver local folder. (See Defining a local folder.)
    Defining a local folder
    After copying the GettingStarted folder, define the folder containing the PHP sample files as a Dreamweaver local folder.
    To define the Dreamweaver local folder:
    1. In Dreamweaver, select Site > Manage Sites. In the Manage Sites dialog box, click the New button, then select Site.
    2. The Site Definition dialog box appears.
    3. If the Basic tab is showing, click the Advanced tab.
    4. In the Site Name text box, enter Trio-PHP.
    5. The name identifies your site within Dreamweaver.
    6. Click the folder icon next to the Local Root Folder text box, then browse to and select the folder (inside the GettingStarted folder) that contains the PHP sample files. The folder should be as follows:
    • C:\Documents and Setting\yourusername\My Documents\Sites-Local\GettingStarted\ 4-Develop\php (Windows)
    • /Users/yourusername/Documents/Sites-Local/GettingStarted/4-Develop/php (Macintosh)
    Leave the Site Definition dialog box open. Next, define a web server folder as a Dreamweaver remote folder. (See Defining a remote folder.)
    Defining a remote folder
    After defining a local folder, define a web server folder as a Dreamweaver remote folder.
    To define the Dreamweaver remote folder:
    1. In the Advanced tab of the Site Definition dialog box, select Remote Info from the Category list.
    2. The Remote Info screen appears.
    3. In the Access pop-up menu, choose how you want to move your files to and from the server: across a local network (the Local/Network option) or using FTP.
    4. Note: There are other options in the Access pop-up menu, but this chapter doesn't cover them. For information about them, see Using Dreamweaver Help.
    5. Enter the path or FTP settings to the web server folder you created in Creating a root folder (Windows).
    6. The folder may be on your hard disk or on a remote computer. Even if you created the folder on your hard disk, that folder is still considered to be the remote folder. The following example shows a possible Remote Folder path if you chose Local/Network access and your remote folder is on your Windows hard disk:
    7. Remote Folder: C:\Inetpub\wwwroot\MySampleApp
    8. On the Macintosh, the folder might be as follows:
    9. Remote Folder: /Users/yourusername/Sites/MySampleApp
    10. For more information on FTP, see "Setting Remote Info options for FTP access" in Using Dreamweaver Help.
    Leave the Site Definition dialog box open. Next, define a folder to process dynamic pages. (See Specifying where dynamic pages can be processed (PHP).)
    Specifying where dynamic pages can be processed (PHP)
    After defining the Dreamweaver remote folder, specify a folder to process dynamic pages. Dreamweaver uses this folder to display dynamic pages and connect to databases while you're developing your application.
    To specify the folder to process dynamic pages:
    1. In the advanced Site Definition dialog box, click Testing Server in the Category list.
    2. The Testing Server screen appears. Dreamweaver needs the services of a testing server to generate and display dynamic content while you work. The testing server can be your local computer, a development server, a staging server, or a production server, as long as it can process PHP pages. In many situations, including setting up for the Trio site, you can use the same settings as the Remote Info category (see Defining a remote folder) because they point to a server capable of processing PHP pages.
    3. Select PHP MySQL from the Server Model pop-up menu.
    4. In the Access pop-up menu, select the same method (Local/Network or FTP) you specified for accessing your remote folder.
    5. Dreamweaver enters the settings you specified in the Remote Info category. Leave the settings unchanged.
    6. In the URL Prefix text box, enter the root URL you would enter in a web browser to request a page in your web application.
    7. To display live data in your pages while you work, Dreamweaver creates a temporary file, copies it to the website's root folder, and attempts to request it using the URL prefix.
    8. Dreamweaver makes a best guess at the URL prefix based on the information you provided in the Site Definition dialog box. However, the suggested URL prefix may be incorrect. Correct or enter a new URL prefix if the suggestion in Dreamweaver is incorrect. For more information, see "About the URL prefix" in Dreamweaver Help (Help > Using Dreamweaver).
    9. For the PHP sample content in Windows, the prefix should be as follows:
    10. URL Prefix: http://localhost/MySampleApp/
    11. On the Macintosh, the prefix should be as follows:
    12. URL Prefix: http://localhost/~yourusername/MySampleApp/
    13. Tip: The URL prefix should always specify a directory, rather than a particular page on the site. Also, be sure to use the same capitalization you used when you created the folder.
    14. Click OK to define the site and dismiss the Site Definition dialog box, then click Done to dismiss the Manage Sites dialog box.
    After specifying a folder to process dynamic pages, upload the sample files to the web server. (See Uploading the sample files.)
    Uploading the sample files
    After specifying a folder to process dynamic pages, upload the sample files to the web server. You must upload the files even if the web server is running on your local computer.
    If you don't upload the files, features such as Live Data view and Preview in Browser may not work properly with dynamic pages. For example, image links might be broken in Live Data view because the image files are not on the server yet. Similarly, clicking a link to a detail page while previewing a master page in a browser will cause an error if the detail page is missing from the server.
    To upload the samples files to the web server:
    1. In the Files panel (Window > Files), select the root folder of the site in the Local View pane.
    2. The root folder is the first folder in the list.
    3. Click the blue Put Files arrow icon in the Files panel toolbar, and confirm that you want to upload the entire site.
    4. Dreamweaver copies all the files to the web server folder you defined in Defining a remote folder.
    The Dreamweaver site is now defined. The next step is to connect to the sample database installed with Dreamweaver. (See Connecting to the sample database (PHP).)
    Connecting to the sample database (PHP)
    During installation, Dreamweaver copies a SQL script to your hard disk. You can use this script to automatically create a sample MySQL database. This section describes how to create a connection to the sample database.
    This section assumes you have installed and configured MySQL on your local or remote computer. To download and install the database system, visit the MySQL website at www.mysql.com.
    Creating the MySQL database
    The sample files for Dreamweaver MX 2004 include a SQL script capable of creating and populating a sample MySQL database.
    Before starting, make sure MySQL is installed and configured on your local or remote computer. You can download the latest version from the MySQL website at www.mysql.com.
    To create the sample MySQL database:
    1. Copy the SQL script file, insert.sql, to an appropriate folder on the computer that has MySQL installed.
    2. If you installed Dreamweaver to its default location, the path to the script file is as follows:
    • C:\Program Files\Macromedia\Dreamweaver MX 2004\Samples\Database\insert.sql (Windows)
    • /Applications/Macromedia Dreamweaver MX 2004/Samples/Database/insert.sql (Macintosh)
    3. If the computer running MySQL is a Windows computer, copy the insert.sql script to MySql\Bin. If the computer running MySQL is a Macintosh, copy the insert.sql script to your Documents folder in your home folder.
    4. On the computer that has MySQL installed, open a command prompt window (Windows) or a Terminal window (Macintosh).
    • In Windows, you can open the command prompt by selecting Start > Programs > Command Prompt or Start > Programs > Accessories > Command Prompt.
    • On the Macintosh, you can open a Terminal window by going to the Applications folder, opening the Utilities folder, and double-clicking Terminal.
    5. (Windows only) Change to the mysql\bin directory by entering the following commands at the command prompt:
    6. cd \
    7. cd mysql\bin
    8. Note: On the Macintosh, you should be able to run mysql from any directory; it should have been added to your path during installation of MySQL. If the following step doesn't work on the Macintosh, though, try typing /usr/local/bin/mysql instead of mysql.
    9. Start the MySQL client by entering the following command:
    10. mysql -uUser -pPassword
    11. For example, if your MySQL user name (also known as an account name) and password are Tara and Telly3, then enter the following command:
    12. mysql -uTara -pTelly3
    13. If you don't have a password, omit the -p argument as follows:
    14. mysql -uTara
    15. If you didn't define a user name while configuring your MySQL installation, enter root as the user name, as follows:
    16. mysql -uroot
    17. The MySQL client's command prompt appears, as follows:
    18. mysql>
    19. Create a new database by entering the following command at the MySQL prompt:
    20. mysql>CREATE DATABASE TrioMotors;[/quote]
    Last login: Mon Mar 27 23:05:38 on ttyp1
    Welcome to Darwin!
    mac:~ albert$ mysql -uMonaco
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 13 to server version: 4.1.18-standard
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql> CREATE DATABASE TrioMotors;
    ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'triomotors'
    mysql>
    Needless to say, I can't get any further. :-/
    [quote=macromedia help files]21. MySQL creates a new database, but it doesn't contain any tables or records yet.
    22. Log out of the MySQL client by entering the following command at the prompt:
    23. mysql>quit;
    24. At the system command prompt, populate the new TrioMotors database in MySQL.
    25. In Windows, use the following command:
    26. mysql -uUser -pPassword TrioMotors < insert.sql
    27. On the Macintosh, use the following command:
    28. mysql -uUser -pPassword TrioMotors < ~/Documents/insert.sql
    29. This command uses the insert.sql file to add tables and records to the TrioMotors database you created in step 5.
    After creating the MySQL database, create a database connection to it in Dreamweaver. (See Creating a database connection.)[/quote]
    G5 Mac OS X (10.4.4) It's ********

Maybe you are looking for