Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorprtscr
     

    Hi,

    I run a Mac with MAMP. I've done everything as the readme and tutorial.markdown says. I've set up akelos_framework, akelos_framework_dev and akelos_framework_tests databases and have written an xxx_installer.php file. But when I run the ./script/migrate xxx install command I get this error:

    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in 
    /Users/alfner/akelos_framework/vendor/adodb/drivers/adodb-mysql.inc.php on line 349
    Connection to the database failed. mysqlt://root:******@localhost/akelos_framework_dev
    

    Thanks for any advice on this!

    •  
      CommentAuthorbermi
     

    It is possible that your MySQL server is not running on port 3306 (MySQL default port) but on MAMPs MySQL port 8889.

    Try to change the port number or try specifying MAMPs socket directly with the option

    'socket' => '/Applications/MAMP/tmp/mysql/mysql.sock'
    
    • CommentAuthorprtscr
     
    Valid point, but I acctually got my MAMP MySQL port on the (MySQL) default 3306.
    •  
      CommentAuthorbermi
     

    Do you get the same error when using the socket option?

    • CommentAuthorprtscr
     

    How do I use the socket option?

    •  
      CommentAuthorbermi
     

    By adding the socket option in yout config/config.php file

    $database_settings = array(
        'production' => array(
            'type' => 'mysql', 
            'socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
            'database_name' => 'my_db_name',
            'user' => 'root',
            'password' => '',
            'options' => '',
        ),
        // and all the other environment settings
    );
    
    • CommentAuthorprtscr
     

    Ahh, didn't understand where to put it first...

    ...I get the same error though:

    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in
    /Users/alfner/akelos_framework/vendor/adodb/drivers/adodb-mysql.inc.php on line 349
    Connection to the database failed. mysqlt://root:******@localhost/akelos_framework_dev
    
    •  
      CommentAuthorbermi
     

    Can you check that

    ls -al /var/mysql/mysql.soc*
    

    points to MAMP socket?

    /var/mysql/mysql.sock -> /Applications/MAMP/tmp/mysql/mysql.sock
    

    Can you connect to the database using...?

    /Applications/MAMP/Library/bin/mysql -uroot -pyourpass  yourdbname
    
    • CommentAuthorprtscr
     

    I don't know if I understood you right but when i run:

    AlfredMacBookPro:~/akelos_framework alfner$ ls -al /Applications/MAMP/tmp/mysql/mysql.sock 
    

    I get:

    srwxrwxrwx   1 alfner  admin  0 Nov 16 21:28 /Applications/MAMP/tmp/mysql/mysql.sock
    

    and I can't connect:

    AlfredMacBookPro:~/akelos_framework alfner$ /Applications/MAMP/Library/bin/mysql -root -root akelos_framework_dev
    ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'akelos_framework_dev'
    
    • CommentAuthorprtscr
     

    Btw is there a way to reset a specific applications configuration? So that you can step through it again in your web browser?

    •  
      CommentAuthorbermi
     

    If you cant access with

    /Applications/MAMP/Library/bin/mysql -uUSERNAME -pPASSWORD  DATABASENAME
    

    there is no way you can access your database via PHP/Akelos unless you provide valid credentials

    • CommentAuthorprtscr
     

    Ahh i didn't get the -u and -p part. When i added that I was enable to connect.

    AlfredMacBookPro:~/akelos_framework alfner$ /Applications/MAMP/Library/bin/mysql -uroot -proot akelos_framework_dev
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 109
    Server version: 5.0.41 Source distribution
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql>
    
    • CommentAuthorprtscr
     

    I tried to move inside the application folder and run the command but it didn't make any difference:

    AlfredMacBookPro:~/akelos_framework/peakhour alfner$     ./script/migrate Peakhour install
    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in
    /Users/alfner/akelos_framework/vendor/adodb/drivers/adodb-mysql.inc.php on line 349
    Connection to the database failed. mysqlt://root:******@/peakhour_dev?socket=/Applications/MAMP/tmp/mysql/mysql.sock
    

    But it's interesting that it first says "/var/mysql/mysql.sock" and then "/tmp/mysql/mysql.sock". Could that have anything to do with it not working?

    •  
      CommentAuthorbermi
     

    Can you connect to the database using other DB's like phpMyAdmin?

    • CommentAuthorprtscr
     
    Yes I create the databases with phpMyAdmin
    •  
      CommentAuthorbermi
     

    What do you get with

    ls -al /var/mysql/mysql.soc* 
    

    it should be something like

    /var/mysql/mysql.sock -> /Applications/MAMP/tmp/mysql/mysql.sock
    

    BTW are you using a "+" or "@" in your password?

    • CommentAuthorprtscr
     

    Nope I don't get that "connection". How do I set that up?

    AlfredMacBookPro:~/akelos_framework/peakhour alfner$ ls -al /var/mysql/mysql.soc* 
    ls: /var/mysql/mysql.soc*: No such file or directory
    

    Nope my password is simply root on my development machine.

    •  
      CommentAuthorbermi
     

    Try with

    sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
    
    • CommentAuthorprtscr
     

    Hmm, I get an error:

    AlfredMacBookPro:~/akelos_framework/peakhour alfner$ sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
    
    WARNING: Improper use of the sudo command could lead to data loss
    or the deletion of important system files. Please double-check your
    typing when using sudo. Type "man sudo" for more information.
    
    To proceed, enter your password, or type Ctrl-C to abort.
    
    Password:
    ln: /var/mysql/mysql.sock: No such file or directory'
    

    Do I have to specify further where the /var/ folder is?

    •  
      CommentAuthorbermi
     

    /var/mysql/ should already exist in order to add a symlink inside that path

    • CommentAuthorprtscr
     

    Cool, now it works! Here's how I did it:

    1. I pressed apple+ctrl+g to be able to go into the /var folder
    2. I created an folder namned /mysql
    3. I created the symlink
    4. And then it worked!

    Thanks a lot for all the help!

    •  
      CommentAuthorthynctank
     
    Why does the 'socket' index of the different environment arrays not accomplish the socket setting properly? I have the latest svn checked out, and it respects my port setting (I too am running MAMP) but ignores my 'socket' as suggested by you, bermi, in one of the comments in this thread.

    If I create a symlink all seems to be well, but this shouldn't be necessary. Especially when the symlink dies whenever you kill MAMP.
    • CommentAuthorVBharathi
     
    Hi,
    I am working with winxp. i was download akelos_framework-0.8(2).But i confused how to install this into my system.
    Thanks for any advice on this!
    • CommentAuthorThijs
     

    Maybe this helps ? : http://wiki.akelos.org/booklink-quickstart-on-windows

    • CommentAuthortorkil
     
    I just discovered Akelos and it seems very promising, but I must agree with thynctank: It's weird that the socket setting does not set correctly when you install. Kind of disappointing when you are first installing a framework that promises to be extremely easy.
    • CommentAuthortjr88
     
    After messing around with this for hours there is a easy fix. In the db config file change local host to 127.0.0.1. Thats it! Make sure you do it for all 3 db conections.
    •  
      CommentAuthorOliver
     

    I am using Akelos with MAMP on a Mac as well. But I get stuck with the setup of the databases, when following the instructions in the "Getting Started Tutorial". There it is stated, that for the DB-setup the following command should be executed:

    ./script/configure -i
    

    Now this somehow does not work with my MAMP setup. I have MySQL running on Port 8889.

    I do can access the database within Terminal - but during the Akelos DB-Setup, I receive the error "Could not connect to the database".

    I tried to setup the Databases by hand (as described in the Booklink Tutorial) but no luck either. I assume, that Akelos does not get that I run the MAMP MySQL Server on Port 8889?

    Thanks for your help.
    Oliver

    •  
      CommentAuthorbermi
     

    Did you set your 'port' option in config/database.yml file?

    •  
      CommentAuthorOliver
     

    Did you set your 'port' option in config/database.yml file?

    The following workaround solved this issue for me (OS X 10.6 with MAMP v1.9):

    1. Connect to the database using a MySQL-GUI such as YourSQL or Sequel Pro
    2. Create the 3 databases manually (mydatabase, mydatabase_test & mydatabase_dev)
    3. Point your Webbrowser to your project's website (f.eg. http://localhost:8888/myproject/)
    4. Continue/finish the setup in the Webbrowser

    I updated the Wiki-Post for OS X accordinginly: Setting Up Akelos On Os X Snow Leopard#Hint