Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by amaruquyllur View Post
    Hello. Thanks god i found your thread.

    I am still stuck in your first problem. Even if i put "root" and my root password in the .config file, i cannot connect. I have the same message error that you had.

    Did you do some extra things or it just worked like that?

    Thanks.
    Did you follow the advice earlier in the thread? That is, can you connect to the database from the command line to confirm mysql is running (and that you have created a user that can connect)? Also, you shouldn't be using the root user for normal operations.

    Comment


    • #17
      Originally posted by amaruquyllur
      Yes:

      - I can connect to mysql as root.
      - I created the user "orthomcl".
      - I can connect with the user "ortomcl" as well.
      - I have granted all permissions to"orthomcl".

      Yet the same error... I am wondering why...
      Okay, have you installed an updated version of the Perl driver for mysql (DBD::mysql)? You will need to make sure you can connect via DBD::mysql, and if you can, that reduces the source of problems to the configuration file or the orthomcl script.

      Comment


      • #18
        Yes, i updated DBD::mysql today.

        According to the orthoMCL User Guide, both DBD::mysql and DBI are running OK (i get no output when i type the commands on my terminal).

        P.S. i edited my last post, maybe that can help.

        Comment


        • #19
          mysql> show grants for 'orthomcl'@'localhost';
          +------------------------------------------------------------------------------------------------------------------+
          | Grants for orthomcl@localhost |
          +------------------------------------------------------------------------------------------------------------------+
          | GRANT USAGE ON *.* TO 'orthomcl'@'localhost' IDENTIFIED BY PASSWORD '***' |
          | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, CREATE VIEW ON `orthomcl`.* TO 'orthomcl'@'localhost' |
          +------------------------------------------------------------------------------------------------------------------+
          2 rows in set (0.00 sec)


          Yet the same error when i type:

          $ orthomclInstallSchema orthomcl.config
          DBI connect('orthomcl:3307','orthomcl',...) failed: Can't connect to MySQL server on '3307' (60) at /***/orthomclSoftware-v2.0.9/bin/../lib/perl/OrthoMCLEngine/Main/Base.pm line 56.

          Comment


          • #20
            Are you administering this machine locally?

            If you are using a firewall you may need to make adjustments to allow connects to port 3307 (the message seems to indicate inability to do that above).

            Comment


            • #21
              Thank you, i will check that.

              Comment


              • #22
                Originally posted by amaruquyllur View Post
                Thank you, i will check that.
                You can check that at the command line:
                Code:
                mysql -u orthomcl -P 3307
                That will let you know if you can connect via port 3307, but I don't think that is the issue. That database connection string does not look correct, which would indicate there is something wrong with your configuration file for the user to be interpreted as the host.

                Comment


                • #23
                  $ cat orthomcl.config
                  # this config assumes a mysql database named 'orthomcl'. adjust according
                  # to your situation.
                  dbVendor=mysql
                  dbConnectString=dbi:mysqlrthomcl:3307
                  dbLogin=orthomcl
                  dbPassword=*** (i'm sure it is right)
                  similarSequencesTable=SimilarSequences
                  orthologTable=Ortholog
                  inParalogTable=InParalog
                  coOrthologTable=CoOrtholog
                  interTaxonMatchView=InterTaxonMatch
                  percentMatchCutoff=50
                  evalueExponentCutoff=-5
                  oracleIndexTblSpc=NONE

                  and:


                  mysql> show databases;
                  +--------------------+
                  | Database |
                  +--------------------+
                  | information_schema |
                  | orthomcl |
                  | test |
                  +--------------------+
                  3 rows in set (0.00 sec)


                  So the database exists. I have all the grants for `orthomcl' on this database, and the .config file should be ok...

                  Comment


                  • #24
                    Try dropping the port from the "dbConnectString" (i.e., try just dbi:mysqlrthomcl).

                    Comment


                    • #25
                      YAY! Wait three minutes. I will jump off a bridge and then come back to celebrate this. I think it worked :-)

                      Thank you!
                      Last edited by amaruquyllur; 09-10-2013, 08:20 AM.

                      Comment


                      • #26
                        USEFUL TIP
                        (for other users)

                        Actually I had already tried to modify that line, putting port 3306 instead of 3307. Didn't work. But deleted the whole line allowed the connection... THROUGH PORT 3306!

                        A bit crazy, but i have to process some data and not time to ask why.

                        Thanks again.
                        :-)

                        Comment


                        • #27
                          Originally posted by amaruquyllur View Post
                          USEFUL TIP
                          (for other users)

                          Actually I had already tried to modify that line, putting port 3306 instead of 3307. Didn't work. But deleted the whole line allowed the connection... THROUGH PORT 3306!

                          A bit crazy, but i have to process some data and not time to ask why.

                          Thanks again.
                          :-)
                          Glad you got things working.

                          For other users, it may not be necessary to specify the port. However, it is important to correctly specify the host, user, password, and database. If you combine those parameters into a string it may cause parsing/connection issues.

                          Comment


                          • #28
                            Default port for MySQL connections is 3306. Hope you are allowing connects only from localhost (or have appropriate firewall rules set).

                            Comment


                            • #29
                              DBI can't connect to local MySQL server (orthoMCL)

                              Dear friends,

                              I encountered similar situation (and this is the closest error message I could find), but could not work it out with the methods discussed here. I would appreciate very much if you can help diagnose and advise some troubleshooting tricks. Please forgive me for this long post as I am a newby for mysql.

                              DESCRIPTION: I installed mysql 5.6.21 to ubuntu 14.04 as a non-root user. I set up the default mysql database using the special configuration file mysql.cnf from the orthoMCL package (socket=/tmp/mysql_2.sock, port=3307, ...):
                              ./scripts/mysql_install_db --defaults-file=mysql.cnf

                              and started mysql server like this:
                              ./bin/mysqld_safe --defaults-file=mysql.cnf &

                              The mysql database seemed running fine. when I typed ps -e|grep -i 'mysqld', I got
                              23388 pts/0 00:00:00 mysqld_safe
                              23553 pts/0 00:00:00 mysqld

                              I logged in to this mysql server as root, and created a database called orthomcl that I will use for OrthoMCL. Then I logged out (ctrlD)
                              ./bin/mysql --defaults-file=mysql.cnf -u root -p
                              mysql> CREATE DATABASE orthomcl;
                              mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE VIEW,CREATE, INDEX, DROP on orthomcl.* TO orthomcl@localhost;
                              mysql> set password for orthomcl@localhost = password('yourpassword');

                              According to the UserGuide, I also created an orthomcl.config file, the first few lines look like this:
                              dbVendor=mysql
                              dbConnectString=dbi:mysqlrthomcl:localhost:3307
                              dbLogin=orthomcl
                              dbPassword=***(I'm sure it's the right password)

                              Then I run the orthomclInstallSchema with the command
                              ./bin/orthomclInstallSchema ./my_orthomcl_dir/orthomcl.config ./my_orthomcl_dir/sql_log_file table_suffix

                              and I got the following error message:
                              DBI connect('orthomcl:localhost:3307','orthomcl',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /home/mylogin/orthomclSoftware-v2.0.9/bin/../lib/perl/OrthoMCLEngine/Main/Base.pm line 56.

                              I assume this may be due to the dbConnectString, so I changed it to
                              dbConnectString=dbi:mysqlrthomcl
                              and executed the orthomclInstallSchema command again, but I still got the same error:
                              DBI connect('orthomcl','orthomcl',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /home/mylogin/orthomclSoftware.......

                              I even tried dbConnectString=dbi:mysqlrthomcl:3307 and got this:
                              DBI connect('orthomcl:3307','orthomcl',...) failed: Can't connect to MySQL server on '3307' (22) at /home/mylogin/orthomclSoftware......

                              QUESTIONS:
                              1) As long as the mysql database was running, it is not necessary to login as orthomcl, right? Because the orthomcl.config file will be used to automatically login to the database.

                              2) What's the difference between these two? Which one should I use? Is the orthomcl a centrally installed mysql server if it was created by root?
                              dbi:mysqlrthomcl (for a centrally installed mysql server with a database called 'orthomcl')
                              dbi:MySqlrthomcl:localhost:3307 (for a user installed mysql server on port 3307 with a database called 'orthomcl')

                              3) I already specified the socket=/tmp/mysql_2.sock in mysql,cnf when I started the mysql server, why was the socket '/var/run/mysqld/mysqld.sock' called later?

                              4) Did I install the DBI and DBD::mysql modules correctly? I am not sure. I installed them using CPAN as root.
                              $ perl -MCPAN -e shell
                              cpan> o conf makepl_arg "mysql_config=/path_to_mysql_dir/bin/mysql_config"
                              cpan> install Data:umper
                              cpan> install DBI
                              cpan> force install DBD::mysql

                              I didn't see error when I check with
                              $ perl -MDBI -e 1
                              $ perl -MDBD::mysql -e 1

                              but I received the same DBI error as above when I installed DBD:mysql, such as
                              t/32insert_error.t ................... skipped: ERROR: DBI connect('test','root',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/32insert_error.t line 14.

                              Sorry about the long text, hope it helps.

                              Comment


                              • #30
                                Your problem is related to mysql install.

                                See these two threads for possible solutions: http://stackoverflow.com/questions/1...un-mysqld-mysq

                                A frequent error message received when using the mysql command line utility is: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ While this error message can be frustrating, the solution is simple. When connecting to a MySQL server located on the local system, the mysql client connects through a local file called a socket […]

                                Comment

                                Latest Articles

                                Collapse

                                • seqadmin
                                  Strategies for Sequencing Challenging Samples
                                  by seqadmin


                                  Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                                  03-22-2024, 06:39 AM
                                • seqadmin
                                  Techniques and Challenges in Conservation Genomics
                                  by seqadmin



                                  The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                                  Avian Conservation
                                  Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                                  03-08-2024, 10:41 AM

                                ad_right_rmr

                                Collapse

                                News

                                Collapse

                                Topics Statistics Last Post
                                Started by seqadmin, Yesterday, 06:37 PM
                                0 responses
                                8 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, Yesterday, 06:07 PM
                                0 responses
                                8 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, 03-22-2024, 10:03 AM
                                0 responses
                                49 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, 03-21-2024, 07:32 AM
                                0 responses
                                67 views
                                0 likes
                                Last Post seqadmin  
                                Working...
                                X