高分聘请高手翻译
各位大侠好,有一段英文要求翻译出来,我有点力不从心。现请各位大侠帮帮忙。如果分数太少,请说明,我一定会找机会另加分数给您。最好能在6月14日早上之前译完。
If MySQL is there, then you're ready to roll.
Before we can get data out of MySQL, we have to put data in it. There's really no easy way to do it at this stage. Most PHP scripts come with what's known as a dump file that contains all the data required to create and populate a MySQL database. The ins and outs of this process are really outside the scope of this tutorial, so I'll just do it for you.
MySQL uses its own user permissions table. At setup, a default user (root) is automatically created with no password. It's up to the database administrator to add other users with various permissions, but I could write a whole other article on that, so we'll stick with using the root user. If you set up your own server and database, it's vital that you assign a password to the root user.
Anyway, let's get on with the database. For Win32 users, I'm sorry, but this requires some DOS work. You'll have to use a DOS window or type everything in the Run window. Don't forget to type in the path to the location of the MySQL/bin directory with your commands. Unix users can work from the MySQL bin directory, but you may have to start each command with ./ so the programs run.
The first thing we need to do is create the actual database. From the command line, type:
mysqladmin -u root create mydb
That creates a database called "mydb." The flag tells MySQL that we're doing this as the root user.
Next we'll add some data using everyone's favorite example, the employees database. We're going to need that dump file I mentioned earlier. If you're interested in how it goes together, review the manual that comes with MySQL or check out http://www.turbolift.com/mysql/.
Copy and paste the following text to a file and save it in MySQL's bin directory. (I'll call the file mydb.dump.)
CREATE TABLE employees ( id tinyint(4) DEFAULT '0' NOT NULL AUTO_INCREMENT, first varchar(20), last varchar(20), address varchar(255), position varchar(50), PRIMARY KEY (id), UNIQUE id (id));INSERT INTO employees VALUES (1,'Bob','Smith','128 Here St, Cityname','Marketing Manager');
INSERT INTO employees VALUES (2,'John','Roberts','45 There St , Townville','Telephonist');
INSERT INTO employees VALUES (3,'Brad','Johnson','1/34 Nowhere Blvd, Snowston','Doorman');
If the lines wrap, make sure that each insert statement is on a new line. Now we'll insert it into the mydb database. From the command line, type:
mysql -u root mydb < mydb.dump
You shouldn't get any errors doing this. If you do, check for incorrect line wrapping.