> 1) I don't know how to create the first database from the command
> interpreter in mysql.  mysql is installed and the daemon is running.  I
> just don't know what to type.  I know the use command for what database
> to use but don't know how to create the first table.  Do I just use a
> DDL create table ... sql statement.

To create a table from the command line, you should follow the create table
syntax outlined here:

http://www.mysql.com/doc/en/CREATE_TABLE.html

> Do I need to be root or anything
> when I run it?

No. Remember that linux root is COMPLETELY UNRELATED to mysql root, as is
the case of all linux/mysql users. By default, mysql root is the only user
and can only access mysql locally.

> How do I know which user and password to use when
> connecting to mysqld remotely

Whatever you want. Or rather, whatever you decide to set up for the
database. Check out the documentation for adding users.

http://www.mysql.com/doc/en/Adding_users.html
http://www.mysql.com/doc/en/User_names.html

Suppose you will connect to the DB from PHP or another program. You can
create a user specifically for this purpose and grant whatever privileges
that will be needed (select,insert,update...) or all if you wish. You can
also limit this user so that he can only connect from a specific location
(e.g. localhost) and require a password (duh) to prevent just anybody from
connecting.

Also, all of the above stuff (creating users and tables) can be done much
more easily from phpMyAdmin, but it's good to learn the real way.

> 2)phpMySQLAdmin complains about calling the first mysql function.  I
> googled the error and it seems to be due to the library not being
> loaded, but I think it also might be that it doesn't know where to look
> for the library.  It is in an obscure path, not /usr/lib.  I'm running
> mandrake 9.1.  Thanks

Since I don't have phpMyAdmin, I'm stabbing blindly at this on. But there
should be at least two workarounds. 1. Look for a phpMyAdmin configuration
file. Perhaps somewhere in there is where it specifies the path, and you
could change this to the real path. 2. Create a symbolic link in /usr/lib to
the real library so that when it looks for it there, it will be pointed to
its actual location. try "man ln" if you're lost.

> Also, maybe I'm remembering wrong but it seemed like _GET variables in
> php were automatically initialized before the start of the script as
> their variablenames, for example, I wouldn't have to manually set
> $pagenumber = $_GET["pagenumber"];  Is this in the php.ini file?

Wade already commented on this, but I'd like to emphasize a point here.
While you can enable this, you really really reeeally should not. It is a
major security hole, because although it makes it slightly quicker to code,
it makes it very easy for a malicious user to wreak havoc. While you may be
thinking only in terms of "using $pagenumber gives me whatever is in the the
querystring," a cracker would be thinking "I can overwrite some
$sensitivevalue by entering the url
http://asdf.com/index.php?sensitivevalue=baddata";. A more eloquent
explanation can be found here:

http://www.php.net/register_globals

> BTW, where should my php.ini file be.  I did phpinfo and it says it
> looks for it in /etc or /etc/php so I put a copy of it in /etc.  I
> suppose it depends on the php/apache installation, but I'd like to make
> sure it is reading the one I think it is so I can put extension=mysql.so
> so I can use mysql asap.

If phpinfo says it's there, then you should be okay. An easy way to test if
it's the right one is to temporarily change a setting (i.e. allowing ASP
tags <% %>) in php.ini and see if it affects your scripts (put some php code
in ASP tags and see if it executes)

Jon


_______________________________________________
newbies mailing list
[EMAIL PROTECTED]
http://phantom.byu.edu/cgi-bin/mailman/listinfo/newbies

Reply via email to