php 解析系统配置&mysql-5.0.96-win32_create database

来源:互联网 发布:sql某列后加合计数 编辑:程序博客网 时间:2024/05/01 20:49
php 解析系统配置

新建系统环境变量:
Name:PHP5
Value:PHP5 PATH (php.exe文件所在目录)

添加到Path变量下:
%PHP5%;%PHP5%\ext;后接原来的Path变量值;

##############################################
命令测试php模块安装是否成功
D:\amp\php-5.6.29-Win32-VC11-x86>php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
ereg
filter
ftp
gd
hash
iconv
json
libxml
mcrypt
mhash
mysql
mysqli
mysqlnd
odbc
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]


##################################################
开启http服务:
D:\amp\httpd-2.4.25-x86\Apache24\bin>httpd.exe

Installation

You must first install the Visual C++ 2008 Redistributable Package. Download and Install, if you have not done so already (see URL above)

Unzip the Apache24 folder in the package zip file to the root directory on any drive. This is the "ServerRoot" in the config.
Example: c:\Apache24

To test your installation;

Open a command prompt window and cd to the \Apace24\bin folder on the drive you unzipped the zip file to.

To Start Apache in the command prompt type:

httpd.exe

Press Enter. If there are any errors it will tell you. Warnings will not stop Apache from working, they do need to be addressed none the less. If there are no errors (there shouldn't be, but it happens) the cursor will sit and blink on the next line. So far so good.

This distribution comes pre-configured for localhost. You can now test your installation by opening up your Web Browser and typing in the address:

http://localhost

If everything is working properly you should see the Apache Haus's test page.

You can shut down Apache by pressing Ctrl+C (It may take a few seconds)


To Install Apache as a service:

In most cases you will want to run Apache as a Windows Service. 
To do so you install Apache as a service by typing at the command prompt [1];

httpd -k install

You can then start Apache by typing

httpd -k start

Apache will then start and eventually release the command prompt window.

[1] You have to run the command prompt as Administrator in Windows Vista/7/2008/8/8.1/10/2012/


Other Command line options:

Stop Apache httpd -k stopRestart Apachehttpd -k restartUninstall Apache Servicehttpd -k uninstallTest Config Syntaxhttpd -tVersion Detailshttpd -VCommand Line Options Listhttpd -h

Connecting to databases - DBD/M Suport

Apache Haus builds include three (3) DBD drivers, ODBC, MySQL and SQLite3. ODBC itself is installed at the time you install your desired Windows ODBC provider or ODBC client driver. Because SQLite3 is in the public domain, sqlite3.dll has been included.

The MySQL DLL required (libmysql.dll) may be obtained from

https://dev.mysql.com/downloads/mysql/

Note that this dbd driver was built against MySQL 5.6.21 (but earlier and later version 5.6 .dll's may work.) libmysql.dll must be included in Apache's /bin folder to be used.


###################################################


### start mysqld server:

D:\amp\mysql-5.0.96-win32\bin>mysqld


## login mysql:

D:\amp\mysql-5.0.96-win32\bin>mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.0.96-community MySQL Community Edition (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> set password for 'root'@'localhost'=password('root');
Query OK, 0 rows affected (0.03 sec)


mysql> create database wordpress;

Query OK, 1 row affected (0.01 sec)

mysql> drop database wordpress;
Query OK, 11 rows affected (0.15 sec)

mysql> create database wordpress_cn;
Query OK, 1 row affected (0.01 sec)

mysql> create database wordpress_4_7;
Query OK, 1 row affected (0.01 sec)

mysql>

0 0
原创粉丝点击