Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Results 1 to 6 of 6
  1. #1
    wicky's Avatar
    wicky is offline play thing
    Join Date
    Jul 2002
    Location
    London
    Posts
    401
    Thanks
    1
    Thanked 0 Times in 0 Posts

    OS X server - phpMyAdmin?

    I'm setting up os x server (10.5) for the first time and could really do with a little advice.

    I'm used to doing much of my web development on a local MAMP install, and I'd like to replicate a similar set up on the server.

    I understand that PHP & MySQL are pre-installed on the server, but I've always done all of my admin via phpMyAdmin so don't really understand where to add a new database.

    Can anybody tell me how to install phpMyAdmin in the relevant place, or alternatively, point me towards some other help/ instructions.

    Thanks

  2. #2
    michaelsanford is offline Translator, Web Developer
    Join Date
    Oct 2002
    Location
    Ottawa/Montréal
    Posts
    2,280
    Thanks
    0
    Thanked 5 Times in 5 Posts
    You can install phpMyAdmin in any location that apache can serve files from.

    To add a new database in the command-line, you can, from the shell, run
    Code:
    mysqladmin -u root -p create <database_name>
    or, from inside mysql:
    Code:
    create database <database_name>;
    Though you do not need to do it as the MySQL 'root' user, but as any user with create permissions.

    I must add that I despise phpMyAdmin and do almost all of my database manipulation in the shell. It keeps my brain fresh, especially for correctly and efficiently crafting queries for use in my php apps. If you're a sysadmin, I would recommend spending some more time in the Terminal and getting used to–and comfortable with–the shell.

  3. #3
    wicky's Avatar
    wicky is offline play thing
    Join Date
    Jul 2002
    Location
    London
    Posts
    401
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks for the feedback Michael.

    Another question: what are the shell commands to start Apache & MySQL?

    On the subject of despising phpMyAdmin:
    We don't all work the same way! I'm sure over time I'll become increasingly easy with the Terminal, as I have so far by learning as I go along. However, as a designer, I work best visually and phpMyAdmin provides a reasonable interface for me, and seemingly for other people too which is why it was developed in the first place and why it is so widely used.

  4. #4
    michaelsanford is offline Translator, Web Developer
    Join Date
    Oct 2002
    Location
    Ottawa/Montréal
    Posts
    2,280
    Thanks
    0
    Thanked 5 Times in 5 Posts
    wicky,

    Surely, some people love it! I was only voicing my personal opinion. If you enjoy it, and it does the job for you, then by all means, use it! I'm sure I do things, and use tools, that others find useless (like doing most of my SQL in the Terminal ) I just can't stand mousing or tabbing around in fields, only to have the query fail, leaving me with no command history. As this is my chief concern, using the mysql client tool in the terminal is my perfect solution.

    Apache can be started from the Sharing pane (Web Sharing) and MySQL is usually started with "/usr/bin/mysqld_safe &" but it would depend somewhat on your particular implementation.

    EDIT: Sorry, I forgot that this was in the OS X Server forum. I don't use OS X Server edition, but I imagine a search of Google "start mysql OS X server" would fix that.

  5. #5
    ylbissop is offline Registered User
    Join Date
    Sep 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by wicky View Post
    what are the shell commands to start Apache & MySQL?
    just so you know you don't have to use shell commands to start stop services in osx server it can all be done with the Server Admin app. once you have server admin connected to your server. Click "help" type "Apache" or "mysql" or whatever into the search box and click "show all results" it should give you the basic docs you need to get you on your way.

  6. #6
    VirtualDarKness is offline Registered User
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by wicky View Post
    Another question: what are the shell commands to start Apache & MySQL?
    for apache:
    Code:
    apachectl [stop|start|restart]
    for mysql.. I've installed it from mysql so not using the mac os x server pre-installed version and I use:

    Code:
    /Library/StartupItems/MySQLCOM/MySQLCOM [stop|start|restart]
    don't remember if the pre-installed version has something like:
    Code:
    /Library/StartupItems/MySQL/MySQL[stop|start|restart]

    bye,
    Giovanni.

    p.s.
    for phpmyadmin you can also setup a global alias in apache (see the "icons" one in the /etc/httpd/httpd.conf file)

    and you could also install webmin that comes handy for some tasks:
    http://www.webmin.com/osx.html

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •