Forums » db.ini

RSS feed for this topic

Info

Tags

  1. I'm getting this error on the screen when I hit my omeka installation for the first time
    Omeka Database Error

    No such file or directory.

    Confirm that the information in your db.ini file is correct.

    the url is http://english3.fsu.edu/omeka

    not sure what else you need, it's a lamp server php 5.3.7 I am using this .htaccess

    # Remember to enable display_errors on development environments only.
    <IfModule mod_php5.c>
    php_value display_errors 1
    php_flag register_globals off
    </IfModule>

    RewriteEngine on

    # If know that mod_rewrite is enabled, but you are still getting mod_rewrite errors,
    # uncomment the line below and replace "/" with your base directory.
    RewriteBase /omeka

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^admin/ - [C]
    RewriteRule .* admin/index.php [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* index.php

    <FilesMatch "\.(php|ini)$">
    Order Allow,Deny
    Deny from all
    </FilesMatch>

    <Files index.php>
    Allow from all
    </Files>

    # Uncomment the lines below in order to enable caching of some files via Apache (after a finished site has gone live)
    <IfModule mod_expires.c>
    # <FilesMatch "\.(js|ico|gif|jpg|png|css)$">
    # ExpiresActive on
    # ExpiresDefault "access plus 10 day"
    # </FilesMatch>
    </IfModule>

    I'm hesitant to send the db.ini with the password but I think it's correct. I've used these settings successfully for a Wordpress installation
    I gave the database user "all" privileges

    thanks for your help

  2. Right to be hesitant about putting passwords on a public forum!

    My first guess, then, would be to double-check the name of the database you created for omeka, which will be a different database from your WordPress one. In some systems, a prefix is automatically added when you create a new database. So it might be worth double-checking whether there's a prefix as you look at the db.ini info.

    It might also be worth double-checking whether the user that you have as all the permissions for the omeka database. Having all permissions for one database in mysql doesn't mean that you will automatically have permissions for new databases that you create.

  3. To be a little more specific, the error "No such file or directory" when trying to connect to the database almost always means you're using "localhost" as your host in db.ini, but PHP isn't set up to look for the MySQL socket file in the right place.

    The php.ini setting that controls this is mysqli.default_socket. It should be set to the same path that MySQL is set to use for the socket file.

    Running the command

    mysql --help | grep "^socket"

    should output the correct socket path (assuming that the mysql command-line client is working).

  4. in the db.ini file
    I have the database name correct and the username and the password correct... triple checked.
    I am using "localhost" as the host

    my php.ini file had the following settings:

    ; Default socket name for local MySQL connects. If empty, uses the built-in
    ; MySQL defaults.
    mysql.default_socket =

    ; Default socket name for local MySQL connects. If empty, uses the built-in
    ; MySQL defaults.
    mysqli.default_socket =

    I located the socket path using the command that you provided and it is /var/run/mysql/mysql.sock

    so I changed the php.ini mysqli.default_socket as follows...
    mysqli.default_socket = /var/run/mysql/mysql.sock

    I'm still getting the same error... can you think of anything else?
    thank you again

  5. You can try using "127.0.0.1" as the database name instead of "localhost"; this will connect using a method that doesn't use the socket file.

    That being said, if you can successfully connect and use your database with the mysql command, you shouldn't need to do anything special to get Omeka to connect.

  6. not sure what's going on, but when I used 127.0.0.1 instead of "localhost" it all works fine, so thank you!
    and if you feel like explaining further and helping me configure so that "localhost" works, I'd be glad to understand, if not, thanks a bunch for the help to get it going

  7. Hi there,

    I am trying to install omeka and am having issues getting the db.ini file correct.

    My host name (I am using my numerical host IP set of numbers) user and pass are all correct. I am using the dbname i created on my host (it doesn't start with any kind of mysql or anything, like shown on the installation video)... but it is still showing that I have not uploaded any files to my site - even though on FTP, they are all there.

    So, what am I supposed to put in these fields:

    prefix = "omeka_"
    charset = "utf8_unicode_ci"
    ;port = ""

    Thanks so much,
    Ruth

  8. Hey!

    I'm having the same problem with the db.ini message. I haven't used all the suggestions that all these wonderful people have posted but while I work on that I was just wondering if anyone could explain this problem. I've been using this database (omeka.oise.utoronto.ca)for months so I don't understand why it stopped working now.

    Thanks!

  9. Basically, you usually see the "No such file or directory" error when the PHP socket and MySQL socket settings don't point to the same path.

    Using "127.0.0.1" instead of "localhost" doesn't try to use the socket file to connect, so that often fixes the problem. You can also fix the issue by correctly setting the php.ini value mysql.default_sock (you might need to check with your host or IT to do this).

Reply

You must log in to post.