Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Wednesday, June 4, 2008

Mysql : NetBeans 6.1 : OpenSolaris 2008.05

I am trying to install "glassfish - mysql bundled netbeans 6.1" on open solaris 05/08. During the installation , I got some Gtk warnings like :

(:1464): Gtk-WARNING **: Attempting to add a widget with type GtkButton to a GtkComboBoxEntry (need an instance of GtkEntry or of a subclass)

(:1464): Gtk-CRITICAL **: file gtkwidget.c: line 3236: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(:1464): Gtk-CRITICAL **: file gtkstyle.c: line 5879: assertion `style->depth == gdk_drawable_get_depth (window)' failed

(:1464): Gtk-CRITICAL **: file gtkstyle.c: line 5879: assertion `style->depth == gdk_drawable_get_depth (window)' failed

Anyway , during the installation of netbeans I have selected all default locations. thus mysql and glassfish were installed in my home directory.

I have tried to start mysql server with the following configuration :

[Click on the image to get larger view]


[Click on the image to get larger view]

but , after clicking 'start' I received an error like :

"ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)".

Which means , Mysql server is not running at all. So , I tried to start it manually.
In terminal , I typed "mysqld_safe --user=mysql --log &" which results :

ritwik@ritwik:~$ cd mysql
ritwik@ritwik:~/mysql$ bin/mysqld_safe --user=mysql --log &
[1] 764
ritwik@ritwik:~/mysql$ nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
bin/mysqld_safe[380]: /var/lib/mysql/ritwik.err: cannot create [Permission denied]
bin/mysqld_safe[388]: eval[1]: /var/lib/mysql/ritwik.err: cannot create [Permission denied]
STOPPING server from pid file /var/lib/mysql/ritwik.pid
tee: /var/lib/mysql/ritwik.err: Permission denied
080604 18:26:41 mysqld ended
tee: /var/lib/mysql/ritwik.err: Permission denied


[1]+ Exit 1 bin/mysqld_safe --user=mysql --log


From the result , I think some permission related factor is creating problems. That's why I changed permission of the above said directories as a super user.

Now "bin/mysqld_safe --user=mysql --log &" results :

ritwik@ritwik:~/mysql$ nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /export/home/ritwik/mysql/data


Thus MySql server is running and doing all desirable functions.

5 comments:

  1. To the owner of this blog, how far youve come?You were a great blogger.

    ReplyDelete
  2. Good to see that you managed it to work !
    Looks like the bundle was installed under regular user which doesn't have write permissions into system directories. For that case you may use following command to start MySQL:

    ./bin/mysqld_safe --defaults-file="$INST_DIR"/my.cnf &

    And all data will be stored inside of MySQL installation directory.

    Here is mine output:

    avm@avm:~/mysql$ ./bin/mysqld_safe --defaults-file=/export/home/avm/mysql/my.cnf &
    [1] 2990
    nohup: ignoring input and redirecting stderr to stdout
    Starting mysqld daemon with databases from /export/home/avm/mysql/data

    ReplyDelete
  3. Mysql permissions issue.
    1. As root chown to the mysql user the database dir (mysql and test)
    $root@you:/var/lib/mysql chown -R mysql mysql/ test/
    2.start mysql
    $root@you:/usr/bin/mysqld_safe &
    3.set root password
    /usr/bin/mysqladmin -u root 'you-password'
    4.use mysql client on the CLI and create a user with grant privileges.

    regards

    ReplyDelete