macosx mamp环境中mysql的配置文件在哪儿
2个回答
展开全部
/*打开master数据库*/
use master
go
if exists (select * from sysdatabases where name='mydb')
--判断mydb数据库是否存在,如果是就进行删除
drop database myDB
go /*创建数据库*/
create database mydb
on primary
(
name = 'mydb_Data',
filename = 'e:\mydb_Data.mdf',
size = 10mb,
maxsize = 100mb,
filegrowth = 10%
) log on
(
name = 'mydb_Log',
filename = 'e:\mydb_Log.ldf',
size = 1mb,
maxsize = 10mb,
filegrowth = 10%
)
go
就是这样!
use master
go
if exists (select * from sysdatabases where name='mydb')
--判断mydb数据库是否存在,如果是就进行删除
drop database myDB
go /*创建数据库*/
create database mydb
on primary
(
name = 'mydb_Data',
filename = 'e:\mydb_Data.mdf',
size = 10mb,
maxsize = 100mb,
filegrowth = 10%
) log on
(
name = 'mydb_Log',
filename = 'e:\mydb_Log.ldf',
size = 1mb,
maxsize = 10mb,
filegrowth = 10%
)
go
就是这样!
展开全部
首先可以全局搜索
find / -name 'my.cnf'
我的是在
/Applications/MAMP/tmp/mysql/my.cnf
然后在该文件中有这样一段话
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /Library/Application Support/appsolute/MAMP PRO/db/mysql56) or
# ~/.my.cnf to set user-specific options.
就可知在 /etc/my.cnf 或者 ~/.mycnf 中配置即可
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询